Mani's Blog

June 9, 2015

mysqldump: Error 2020: Got packet bigger than ‘max_allowed_packet’ bytes when dumping table `content_versions` at row: 0

Filed under: Uncategorized — mani @ 5:11 pm

issue:  While I running mysqldump, I ran into this issue.  I know this DB need bigger ‘max_allowed_packet’ value.  I have bumped the values, no luck.

mysql> show variables like ‘max_allowed_packet’;
| Variable_name | Value |
| max_allowed_packet | 134217728 |
1 row in set (0.00 sec)

mysql> set global max_allowed_packet=536870912;
Query OK, 0 rows affected (0.00 sec)

Soultion: I have to setup the value –max_allowed_packet=1073741824  as a command line parameter to solve this issue.

Following line solved my issue.

mysqldump –max_allowed_packet=1073741824 –all-databases | gzip -c > all-db.sql.gz


May 19, 2015

LOG: restarted WAL streaming at %S on timeline 1

Filed under: Uncategorized — mani @ 4:30 am


I had setup like this using streaming replication.  Once I promote Slave1 as Master, the replication on Slave2 is broken with following error messages.

Master –> Slave1 –> Slave2

2015-05-19_01:00:19.55306 2015-05-19 01:00:19.553 UTC: @/555a7720.599a[2986]: LOG: restarted WAL streaming at 449/1E000000 on timeline 1
2015-05-19_01:00:19.55317 2015-05-19 01:00:19.553 UTC: @/555a7720.599a[2987]: LOG: replication terminated by primary server
2015-05-19_01:00:19.55319 2015-05-19 01:00:19.553 UTC: @/555a7720.599a[2988]: DETAIL: End of WAL reached on timeline 1 at 449/1E000090.


I had to copy files from pg_xlogs directory from Master to Slave box under pg_xlogs directory.   Added recovery_target_timeline = ‘latest’  in recovery.conf, then restarted the slave DB.

March 30, 2015

MySQL Interview questions

Filed under: Uncategorized — mani @ 9:06 pm

You worked on Oracle, MS SQL and MySQL, What is your strongest Area? Oracle

How would find out the size of the table in MySQL? Oracle DBA_Segments Nope

How do you start or stop MySQL services? ok

What is the default port on 3306?

How would you run multiple mysql instances on the same box? Nope

How do you find your whether the database is fragmented are not? How do you fix it?

What kind of backup tool you have used to backup? How would you schedule daily backup using xtrabackup?

Let us assume that customer calls you and says the database response is very slow? What would be your approach in debugging this issue?
Slow query log.

How do you make Schema changes on on 200GB table with foreign key?

How would you find out list of indexes on the table?

Have you ever done replication?
Replication – Cloning – Streaming.
Row-based and statement based.
How do you make sure Master and Slave database is in sync? If not in sync How would you fix it?

Are you familiar with different Isolation levels?

What happens when the auto increment value reached the maximum value?

How do you check the query performance? What would you do if the index is not being used?

Someone had an access to server, he/she dropped a database. How would you recover to the point in time?

How can you drop the Primary key from the table?

Percona Tool Kit.

How good you are in scripting?

December 3, 2013

[Errno 14] PYCURL ERROR 22 – “The requested URL returned error: 404”

Filed under: Uncategorized — mani @ 10:57 pm

I ran into following issue while I was installing Cloudera Manager 4.x.

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base:
* extras:
* updates:
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package cloudera-manager-server.x86_64 0:5.0.0-0.cm5b1.p0.77.el6 will be installed
–> Processing Dependency: cloudera-manager-daemons = 5.0.0 for package: cloudera-manager-server-5.0.0-0.cm5b1.p0.77.el6.x86_64
–> Running transaction check
—> Package cloudera-manager-daemons.x86_64 0:5.0.0-0.cm5b1.p0.77.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

Package                  Arch   Version                 Repository        Size
cloudera-manager-server  x86_64 5.0.0-0.cm5b1.p0.77.el6 cloudera-manager 7.7 k
Installing for dependencies:
cloudera-manager-daemons x86_64 5.0.0-0.cm5b1.p0.77.el6 cloudera-manager 174 M

Transaction Summary
Install       2 Package(s)

Total download size: 174 M
Installed size: 240 M
Downloading Packages: [Errno 14] PYCURL ERROR 22 – “The requested URL returned error: 404”
Trying other mirror. [Errno 14] PYCURL ERROR 22 – “The requested URL returned error: 404”
Trying other mirror.

Error Downloading Packages:
cloudera-manager-daemons-5.0.0-0.cm5b1.p0.77.el6.x86_64: failure: RPMS/x86_64/cloudera-manager-daemons-5.0.0-0.cm5b1.p0.77.el6.x86_64.rpm from cloudera-manager: [Errno 256] No more mirrors to try.
cloudera-manager-server-5.0.0-0.cm5b1.p0.77.el6.x86_64: failure: RPMS/x86_64/cloudera-manager-server-5.0.0-0.cm5b1.p0.77.el6.x86_64.rpm from cloudera-manager: [Errno 256] No more mirrors to try.

Solution:  Yum clean all didn’t work.  Previous version file was stuck, I had to delete files under cache yum  “/var/cache/yum/” then all worked well.

September 6, 2013

Secret Sauce for Multitasking

Filed under: Toastmasters — mani @ 4:57 pm

Secret of Multi-Taking

 Multi-tasking, the word came from computer multi-tasking.   Multi-tasking means doing more than 1 task at the same time.

How many of you do multi-tasking here?

Why are we doing multi-task?  We are checking mails when we are on the phone.  We are sending text while we are in the office meeting.  Watching television at the same time jumping from site-to-site.  Also we feel good and gifted when we do multi-tasking.  Study shows that multi-taskers think that they are smarter than others.

I used to have a Manager, whenever I go and talk with him.  He will be on the keyboard, typing; I wait for him to complete.   But he would say, go ahead I am listening.

There are few Universities studied about multi-tasking.   I would like to go over the test conducted by Stanford University and their report.  Clifford Nass and his colleagues Eyal Ophir and Anthony Wagner conducted the research.

Each of their tests, the researchers split their subjects into two groups; those who regularly do a lot of media multitasking and whose who don’t.

In one experiment, the groups were shown sets of two red rectangles alone or surrounded by two, four or six blue rectangles.  Each configuration was flashed twice, and the participants had to determine whether the two red rectangles in the second frame were in a different position than in the first frame.

They were told to ignore blue rectangles, and the low multitaskers had no problem in doing that.  But the high multitaskers were constantly distracted by the irrelevant blue images. Their performance was horrible.

Researchers thought they had better memories, so they run the 2nd test.  After being shown sequences of alphabetical letters, the high multitaskers did a lousy job at remembering when a letter was making repeat appearance.  The low multitaskers did great.

Researchers ran another test to switching from one thing to another faster and better.  Again the heavy multitaskers under performed light multitaskers.

After putting about 100 students through a series of 3 tests, the researchers realized those heavy media multitaskers are paying a big mental price.

They’re suckers for irrelevancy.   Everything distracts them.  They cannot ignore things that are not important.  They cannot keep thing separate in their minds.

My Suggestion:

Let us focus on one task at a time, don’t let your brain stressed out, don’t let your IQ go down.  Let us not get into memory loss by doing multi-tasking.  Let us say bye-bye to multi tasking.

I can take up few questions now.

 Q & A

  1.      What happens in our brain when we multi-task?
  2.      What impact does multi-tasking have on mental health?
  3.      Is it dangerous to talk on the phone while driving a car, effectively multi-tasking?
  4.      How does multi-tasking affect human IQ?
  5.     What are the short-term impacts of multi-tasking?
  6.      What is the long-term impact of multi-tasking?
  7.      Will the critical/analytical thinking of the younger generation be affected?
  8.      Why is research into multi-tasking important?
  9.      Are multi-taskers bad at multi-tasking?

Here is Q&A from University of California Study

Impacts of multi-tasking

Scientists are still working out the impacts of multi-tasking on our brains, our mental health and our productivity.

What happens in our brain when we multi-task?

While the human brain is capable of pursuing multiple goals at once, how they are divided by the brain is still a mystery.

Researchers have imaged human brains using MRI and watched them try to multi-task as subjects performed a set of variously interrupted tasks. The brains can divide resources fairly easily for two tasks, but have a much harder time juggling three or more.

When single-tasking, researchers found subjects used both of their frontal lobes to manage the work. When there were two tasks in play, each half of the brain was devoted to managing each task. However, when a third task interrupted the second task, subjects’ brains started crashing: error rates shot up and response times plummeted. Researchers say this suggests a strong physical limitation on how many things we can think about at once, namely, how many brain hemispheres we have. The study’s authors note the results may clarify many of the limitations in our decision-making and reasoning abilities.

What impact does multi-tasking have on mental health?

Macquarie University’s Dr Irwin says multi-tasking makes it harder to derive satisfaction from performing tasks. The interruptions can make work unsatisfying and, she suspects, lead workers to not perform a job as well as they would if they did not have to switch often between tasks and just focus on one at a time.

By its very nature, multi-tasking is stressful. Long-term stress can have serious health impacts.

It is known that the area in the brain most involved with multi-tasking is the one most likely to be affected by stress. The pre-frontal cortex helps to assess tasks, prioritise them and assign mental resources. It also marks the spot where we left off a task so we can return to it later. This area is affected by prolonged stress.

Stress can also affect other regions of the brain, such as the hippocampus which helps form new memories and accesses existing ones. Damage to it can make it difficult for people to acquire new skills and facts. Stress hormones can also reduce short-term memory.

Scientists say juggling e-mail, phone calls and other incoming information can change how people think and behave. And while the information plays to a primitive impulse to respond to immediate opportunities and threats, it also provokes excitement. The accompanying squirt of dopamine, released into the human bloodstream, can be addictive. Without it, people feel bored.

Is it dangerous to talk on the phone while driving a car, effectively multi-tasking?

Research shows the answer is an overwhelming yes, even suggesting that multitasking can be more dangerous than drink-driving.

A 2006 study by University of Utah psychologists showed motorists who talk on mobile phones are as impaired as drunk drivers. Mobile phone users were five times more likely to be involved in accidents than undistracted drivers – the same level as someone with a 0.08 per cent blood-alcohol level. Drivers who talked on mobile phones were also shown to have slower reactions than those who did not.

Talking and driving are mutually exclusive because the same part of the brain is used to focus on the phone conversation and the road. When talking, drivers withdraw their attention from the road in order to formulate responses. Because the brain cannot focus on two sources of input at once, driving and also listening or talking on the phone are known to distract the brain and increase the likelihood of accidents.

In some states of the US, mobile phones are banned from cars.

In Australia, mobile phone use has not been banned while driving. However, only hands-free devices are legally allowed to be used by people while driving a car.

How does multi-tasking affect human IQ?

UK research shows distracted workers suffer a greater loss of IQ than people who smoke marijuana.

Dr Glenn Wilson, a psychiatrist at King’s College London University, monitored the IQ of workers throughout the day in 80 clinical trials in 2005.

His study found the average worker’s functioning IQ, a temporary qualitative state, drops 10 points when multitasking. That is more than double the four-point drop that occurs when someone smokes marijuana.

What are the short-term impacts of multi-tasking?

Many psychologists claim among the negative “side effects” of multi-tasking is an increase in short-term memory loss.

Dr David Meyer, a psychology professor at the University of Michigan, agrees with another US psychologist Dr John Arden, that when humans multitask too much, they can experience short-term memory problems or difficulty concentrating.

University of California research has shown that people interrupted by e-mail report significantly increased stress compared with those left to focus. Gary Small, a psychiatrist at the Los Angeles University, says stress hormones have been shown to reduce short-term memory.

What is the long-term impact of multi-tasking?

The jury is still out because multi-tasking is such a relatively new phenomenon and much research is being undertaken. Only time will tell.

Will the critical/analytical thinking of the younger generation be affected?

Research is continuing into these aspects of multi-tasking and there is not enough evidence to make meaningful conclusions at this stage. We’ll just have to wait and see.

Why is research into multi-tasking important?

Dr Meyer says understanding how the brain establishes priorities between tasks and allocates resources may help solve “fundamental problems associated with the design of equipment and human-computer interfaces for vehicle and aircraft operation, air traffic control, and many other activities in which people must monitor and manipulate the environment through technologically-advanced devices.”

It may also aid personnel selection, training, assessment and diagnosis of brain-damaged patients, rehabilitation, and formulation of government and industrial regulations and standards.

Results may also improve general understanding of how the brain and human consciousness work.

Are multi-taskers bad at multi-tasking?

Research reported in the Proceedings of the National Academy of Sciences suggests this may be the case. Professor Cliff Nass of Stanford University was a co-author of the study which found that those who engage in multitasking are least able to do so well.

Professor Cliff Nass, of Stanford University, showed in a study that those who engage in media “multi-tasking” are least able to do so well. Two groups were defined: those who routinely consumed multiple media such as internet, television and mobile phones, and those who did not. In psychology tests for attention and memory, the “low multi-taskers” consistently outdid their highly multitasking counterparts.

“The shocking discovery of this research is that [high multi-taskers] are lousy at everything that’s necessary for multitasking,” Professor Nass said.

“The irony here is that when you ask the low multi-taskers, they all think they’re much worse at multitasking and the high multi-taskers think they’re gifted at it.”

Results from the research could be profound, potentially suggesting new means of teaching and even reporting news for those given to a multi-media feed of information.

April 30, 2013

Table Topic Questions

Filed under: Toastmasters — mani @ 3:41 pm

1. If you could fly in a hot-air balloon over any city in the world, what city would you choose?

2. If you could be any age again for one week, what age and why?

3. What you want to be 5 years from now?  What is your plan to get there?

4. Some people say a little while lie is sometimes okay.  What do you think?

5. Do you think you have accomplished something in your life? if yes, what do you think of your accomplishment?

6. What would need in order for you to retired tomorrow?  In other words what makes you happy or satisfied in order for you decide to go for retirement?

7. What annually televised sporting event is an absolute must-see for you?

8. Pretend that you are a CEO of company Pepsi Cola?  You will have to give out speech on congratulating employees on their successful quarter and short speech that encourages employees to be more focussed and productive, so that they can beat their competitor.

9. Pretend that you are president of United States and this is your first speech once you are elected.

10. Pretend that you are a project Manager for your team and product.  Two team members don’t like each other for some reason.  One day they had an argument in the office.  One person got very emotional and left the office immediately.  How would you handle the situation and convince both team members.

TIP on Speech Evaluation

Filed under: Toastmasters — mani @ 3:36 pm

TIP of the day is about Speech Evaluation
The main purpose of the speech evaluation is to help the speaker become more confident and a better speaker in various situations.

“Feedback is the Breakfast of Champions”—Ted Dibble

There are so many techniques that can be used to evaluate. One of them is Sandwich Pattern.

You know how the sandwich would look like right?  On the top and bottom you have a bun/bread, in the middle you have
all ingredients, including cheese, tomato, lattice, and meet etc…

Apply the same technique
— Begin and end your evaluation with a note of encouragement or praise.
— three or four clear Commendations
— one or 2 recommendation.
— potential areas for Improvements
— Avoid criticizing or complaining

When you evaluate next time think of the sandwich.

April 19, 2013

Basics of Tennis

Filed under: Toastmasters — mani @ 2:54 am

Basics of Tennis – The Demonstration Talk – Speaking to Inform

A demonstration is the best effective way to explain a process, activity or product.  I have decided to demo on basics of Tennis.  The demo includes basic tips & techniques required to play tennis.

I just want you all to know that I am not a trainer, I am not trained in Tennis, but I do play tennis for fun.  Before I give any demonstration, I take a chance to explain you that tennis is one of best sports anyone can choose to play.

Tennis has historically been called the sport for a lifetime.

  1. People who participate in tennis three hours per week cut their risk of death in half from any cause, according to physician Ralph Paffenbarger of Harvard University School of Public Health. (Paffenbarger studied over 10,000 people over a period of 20 years)
  2. Tennis players scored higher in vigor, optimism and self-esteem while scoring lower in depression, anger, confusion, anxiety and tension than other athletes or non-athletes, according to Dr. Joan Finn and colleagues in a study done at Southern Connecticut State University.

I play tennis in the Weekend.  I do see bunch of Junior, Senior and couples play next to us.

Let us get into Demo.  There are 3 basic techniques are critical in Tennis.  First grip of the racquet, Second Stroke and third your foot work.

Grip: Let us learn the various grips. There are 4 types of grips.

Eastern: It is for the beginner.  It is shaking hand with racquet.  V of your hand sees the top of your racquet.

Back-hand grip: First knuckle of fore finger on top of the racquet.

Continental: It is in between eastern grip and back-hand grip.  It is used by advanced players many times to play volley on both sides.

Western: “Pan handle grip”. Used by many young players to create extra top-spin.

Stroke:  I like to show what is the forehand and backhand stroke.  Take away and follow through action.  On both stroke your back foot is up on the toe through the shot.  Always emphasize the wrist is higher than shoulder.

Foot Work: Tennis footwork plays a key role in the game of tennis.  If your tennis footwork is immaculate, you can become a better tennis player.

Ready position, Split position, long steps, shot steps.

Ready position:  Ready to play position. Keep your racquet in front of you, center of your body.  Have your knees bend and wide.

Split position: When you hit the ball from ready position, you should start with split steps.  Split steps helps you move any direction quickly.  To perform a split steps you bounce slightly from ready position.

Long steps: helps to cover the court.

Shot steps: Shot steps are vital part of your game.


March 15, 2013

“Health is Wealth”

Filed under: Toastmasters — mani @ 1:29 am

This is one of my Toastmasters speech project.

How many of you own a car?

How many of you take your car for regular maintenance?

Almost all of you take care of it really well.  That is good.

In case if I have asked you different question, who takes care of your health/body really well?

I am sure there will be variety of answers, some really take care of it really well, sometimes; Some of us we don’t know.

Our physical body is mechanical machine very much like car though it does much more.

I was asked this question when I attended one of my Yoga class. Why many of us take care of our car, when we don’t pay enough attention on our own health?

The answer was we invested on our car or other vehicle, but that is not the case with your body or health. If we have spent 100K, 50K or 20K on our body then we may probably show real care on it. Though it is little weird after a while I was convinced with that answer. I was thinking about my life 13 or 14 years ago, when I bought my new car, I used to keep it very clean, I don’t let anybody drive my car and I don’t let anybody drink soda or juice in my car.  After the marriage and kid, everything went upside down.

The purpose of the speech is to share my findings about healthy life style.

Buddha says,

Without health life is not life; it is only a state of languor and suffering – an image of death.

Everybody talks about healthy lifestyle and I really wanted to know what it means to me?

How much is our health really worth?

Per, Individuals who choose an unhealthy lifestyle will spend an average of $365,000 on food over the course their life expectancy of 80 years, while a healthy individual will spend an average of $400,000 on food over the course of their 84-years of life expectancy.

Yes, it does cost more but when you compare these costs to cash you spend when you are sick or overweight, the healthy side of things starts to look a whole lot brighter.

Per study by University college London, which included 5,100 middle-aged people, those who engaged in four key behaviors — not smoking, moderate drinking, exercising regularly, and eating fruits and vegetables daily — had triple the odds of avoiding disability, chronic disease, or mental health problems over a 16-year period, when compared with people who practiced none of these behaviors.

Per this speech project, I am supposed to bring a visual aid, and I thought why don’t I represent myself as visual aid.

I have been trying to maintain healthy lifestyle for the past 6 months. I have lost 15 pounds in summer and gained 4 pounds back in winter.  It is not just about losing weight, much more than that.  I am pretty happy about overall result.

5 most important healthy behaviors:

Not smoking, low or no alcohol intake, weight control, Physical activity and healthy diet.

I remember one of my previous colleagues, had this quote in his signature.

“If you don’t find time for workout; you find lot of time when you are sick” – My Friend.

More than 60% of Americans today are officially classified as “obese.” So healthy lifestyle is not optional anymore.

Lets take care of our health like a brand new car.

March 14, 2013

“The Power of Social Media”

Filed under: Toastmasters — mani @ 4:37 pm

This is one of my speeches in Toastmasters.

What is Social Media?

Social media are social software, which mediates human communication.

Social media technologies take on many different forms including magazines, Internet forums, weblogs, social blogs, micro-blogging, wikis, social networks, podcasts, photographs or pictures, video, review and rating.

BTW, “I am not representative of any Social Media, I am here just to share what I feel about my social media experience”.

Why Social Media is important?

In the year 2012, social media became one of the most powerful sources for news updates through platforms such as Twitter, Facebook and Google+.

Here are some statistics:

400 million twitts per day. Facebook has 500 million active users. Wikipedia has more than 28 million articles written by 75,000 contributors in 260 Languages. Youtube is 4th visited site on the Internet.  It’s the #2 search engine on the web.  Average user spends 55 minutes a day on Facebook.  In fact, I work for a company called NING, which manages 90K private social networks.

How Social Media helps?

In fact is it is really very large topic.  It helps for organizations, communities, and Individuals during earthquake, Tsuniami, Storm and election, daily life and other events.  I am going to share very few facts with you.

Helped in Politics Change? (Text Messages)

In 2001, Philippine President’s fate was sealed, just because they were able to forward 7 million text messages, over million people arrived to protest in Manila.

Instant notification (Twitter)

I use caltrain for my daily commute to the office.  I get instant update if the Caltrains are delayed.  83% of business owners said twitter adds more value their business.

Professional networking( LinkedIN)

Having registered in LinkedIn, you will get tons of benefit.  Get connected with professional friends and colleagues.  Participate in discussion group, Getting Job Email Alerts, Conducting Company Research, Getting Recommendations, Letting Companies find you.

As long as you have good skill set, updated profile and good contacts, finding job is not that difficult.  There is a high probability that you will find job with reference.   Recruiters consider profile comes through the reference first.  For example: Facebook received 250K resumes last year.  It is really hard for them to review those entire resumes carefully and call the right people.

Sharing news, photos and videos (Facebook)?

I am connected with many of my old friends after 15+ years.  I get update on what is happening at my friends’ life.  We get to share lots of videos and outstanding pictures.  I get to read/share many inspirational stories.  I get motivated many situations.   It is very easy to organize blood donation drive, Bone Marrow drive, and running/walking for good cause. I do agree people use Facebook in many different levels.   Someone says “Good Morning”, there are 15 likes on it. If you are a girl of woman you will get 50 likes. That is different story we are not going there.

Helps person in need?

I read an article in Time Magazine.  Rick Thomas, a 46-years old commercial pilot, was diagnosed with a rare form of kidney cancer in February; he knew he couldn’t afford the $125,000 treatment cost.  Then his sister Annie Howell suggested they create a page on GoFundMe, a crowd-funding site.  They didn’t ask anything anybody.

So to promote her brother’s cause, she initially sent links to friends and family members, who sent links to their friends and family and so on.  “All of them posted it on social media”

It took just two months to raise $144,000 from 1500 donors.  That is the power of social media.

Remember Contacts in your social Network is more powerful.

Next Page »

Blog at