mysql sleep processes issue solved

I faced the sleep query issue sometimes.  Many times that kills the server. When ever you are using dedicated virtual hosting server that time you need to me very careful how you are setting up the apache and mysql. we solved mysql sleep processes issue

mysql sleep processes issue solved

mysql sleep processes issue solved
mysql sleep processes issue solved

I found some major reasons for mysql sleep processes. Here I am giving some reasons:

[viral-lock message=”Reasons and Solution is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]

1. apache requests increase
2. mysql queries increase
3. mysql slow queries increase
4. apache connections start to wait on slow mysql queries
5. apache connections take longer to close
6. more apache connections are opened
7. with each apache request a new sleeping mysql connection is made
8. mysql & apache reach max_connections
9. server slows to a crawl

[/viral-lock]

Using linux top command you can check the load average and which process is taking so much memory of your server. If you saw mysqld is taking much memory of server then you should check using following mysql commands:

> show full processlist;

using this command you can check the mysql processes. Which sql queries being fired on mysql server. If you found so much sleep processes then you should check your mysql variables and settings. If so much mysql queries being fired on specific table then you should change the table storage engine type.

Using following command you can change the storage engine type.
> ALTER TABLE tablename ENGINE = MYISAM;

MYISAM storage engine type is faster then inodb. you can create the mediator tables also for big size table to handing a load of table.

Then major change for solving the issue of sleep processes is, you should change the wait_timeout variable. Default value is 2800 seconds.

mysql> show variables;

you can change the setting using following  mysql command. Best value is 60 second need to be set for wait timeout.
mysql> show variables like ‘wait_timeout’;

mysql> set global wait_timeout=60;

mysql>show variables like ‘wait_timeout’;

After doing above changes you can check the mysql processlist. If you are still facing issues with mysql then please write to me.

How to install Mysql workbench on Fedora

You can use following commands for installing the Mysql workbench on Linux system. You can use following commands for installing the Mysql workbench on Linux system. you will get answer of how install mysql workbench, is very nice tool for creating the ER diagram on mysql database. I personally like that tool so much.

how install mysql workbench

[root@sonyk-pc sony]# rpm -Uvh remi-release-11.rpm
warning: remi-release-11.rpm: Header V3 DSA signature: NOKEY, key ID 00f97f56
Preparing… ########################################### [100%]
1:remi-release ########################################### [100%]

[root@sonyk-pc sony]# yum –enablerepo=remi install mysql-workbench
Loaded plugins: refresh-packagekit
remi | 3.0 kB 00:00
remi/primary_db | 198 kB 00:01
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package mysql-workbench.i586 0:5.2.26-1.fc11.remi set to be updated
–> Processing Dependency: mysql-connector-c++ >= 1.1.0-0.1.bzr888 for package: mysql-workbench-5.2.26-1.fc11.remi.i586
–> Processing Dependency: python-paramiko for package: mysql-workbench-5.2.26-1.fc11.remi.i586
–> Running transaction check
—> Package mysql-connector-c++.i586 0:1.1.0-0.1.bzr888.fc11.remi set to be updated
—> Package python-paramiko.noarch 0:1.7.5-1.fc11 set to be updated
–> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================================================================
Installing:
mysql-workbench i586 5.2.26-1.fc11.remi remi 14 M
Installing for dependencies:
mysql-connector-c++ i586 1.1.0-0.1.bzr888.fc11.remi remi 252 k
python-paramiko noarch 1.7.5-1.fc11 updates 982 k

Transaction Summary
==================================================================================================================================================================================================================================
Install 3 Package(s)
Upgrade 0 Package(s)

Total download size: 15 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): mysql-connector-c++-1.1.0-0.1.bzr888.fc11.remi.i586.rpm | 252 kB 00:03
(2/3): mysql-workbench-5.2.26-1.fc11.remi.i586.rpm | 14 MB 02:17
http://fedoramirror.hnsdc.com/updates/11/i386/python-paramiko-1.7.5-1.fc11.noarch.rpm: [Errno 14] HTTP Error 404: Not Found
Trying other mirror.
(3/3): python-paramiko-1.7.5-1.fc11.noarch.rpm | 982 kB 00:09
———————————————————————————————————————————————————————————————————————————-
Total 98 kB/s | 15 MB 02:34
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 00f97f56
remi/gpgkey | 1.3 kB 00:00
Importing GPG key 0x00F97F56 “Remi Collet ” from /etc/pki/rpm-gpg/RPM-GPG-KEY-remi
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : python-paramiko-1.7.5-1.fc11.noarch 1/3
Installing : mysql-connector-c++-1.1.0-0.1.bzr888.fc11.remi.i586 2/3
Installing : mysql-workbench-5.2.26-1.fc11.remi.i586 3/3

Installed:
mysql-workbench.i586 0:5.2.26-1.fc11.remi

Dependency Installed:
mysql-connector-c++.i586 0:1.1.0-0.1.bzr888.fc11.remi python-paramiko.noarch 0:1.7.5-1.fc11

Complete!
[root@sonyk-pc sony]#

After installation you will find the mysql workbench under application-> programming  menu

After that you will you will see the following screen.

how install mysql workbench
how install mysql workbench

clicking on new connection you can create the new connections and after that If you want to create the ER diagram then go to database Option and reverse engineering.

How you find this article for “how install mysql workbench”. please write to me.

Another mysql related article which will be helpful to you.

Install Mysql cluster on Fedora box
How to take mysql backup from file system

Digg Version 4 is launched to compete with Twitter

This week Digg.com launched the version 4. After long time and digg.com completed the development of version 4 and they launched version successfully.  The new design and features are really nice.

Digg Version 4 is launched to compete with Twitter

The best part what we found is we can register with facebook and twitter accounts.

Digg Version 4 is launched to compete with Twitter
Digg Version 4 is launched to compete with Twitter

You can find the facebook friends and twitter people and google friends for follow them.

What digg.com is saying about version 4?

I’m excited to announce that today we opened up the newest version of our Digg platform. We’ve been working hard on this next evolution of Digg (what we’ve been calling “v4”) and everyone here is really looking forward to hearing your thoughts on the changes we’ve made.

This redesign is a major revision of our platform – front end to back end – this is just phase one of what will be an on-going, iterative process, involving lots of input from all of you. We’ll be pushing out features on a regular basis and tweaking often.

Our goal has always been for Digg to be a place where people can discover and share content and conversations from anywhere on the web. With Digg v4, we are introducing a few things that will make discovering and discussing news a lot better.

New features of Digg.

  • Speed – the new Digg is faster in every way: submitting articles, loading pages, and Digging content.
  • Personalization – we put a lot of thought into how people consume news and wanted to make it easy to view content from the friends, publishers, and influencers you care about. Once you start following your friends, and sources you trust, we’ll build a custom news homepage for you called “My News”. Customizing Digg will enable you to see your friend’s recent Digg or Comment, as well as the latest article submitted by a publisher.
  • Friends & sharing – the new Digg is all about making it easy to see the stories your friends are Digging and commenting on, and to share interesting stories with them. You’ll notice activity from the profiles you’re following highlighted in stories, on comment pages, and even on their profile page as you navigate the site. Attach your blog or RSS feed to your profile and send your followers content as you create it.

Add google maps in wordpress post

You can add the google maps in wordpress post or pages very easily. You need to just use following code in your functions.php file. Open your functions.php file from your wordpress theme folder and copy paste the following code in that file.

Add google maps in wordpress post

You can Add google maps in wordpress post or pages very easily. Open your functions.php file from your wordpress theme folder and copy our code in file. If you don’t have functions.php file in your wordpress theme folder then create functions.php file and put following code in that file.


//Google Maps adding through Shortcode
function add_googlemap_in_wordpresss_in_wordpress($atts, $content = null) {
 extract(shortcode_atts(array(
 "width" => '620',
 "height" => '430',
 "src" => ''
 ), $atts));
 return '<iframe width="'.$width.'" height="'.$height.'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="'.$src.'&output=embed" >';
}
add_shortcode("googlemap_in_wordpress", "add_googlemap_in_wordpresss_in_wordpress");

How to use google maps in your wordpress posts and pages.

use the following code in your posts or pages.

[googlemap_in_wordpress width="280" height="280" src="[you_url]"]
Add google maps in wordpress post
Add google maps in wordpress post

You can change the height and width as per your requirement and for url you need to use following url
http://maps.google.com/
go to above url and choose your location and right side top you will find the link option. click on that link url and you will get the link of your location. Just copy paste that url. example as follows

[googlemap_in_wordpress width="280" height="280" src="[http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=New+York,+NY,+United+States&sll=37.0625,-95.677068&sspn=47.215051,79.013672&ie=UTF8&hq=&hnear=New+York&ll=40.555548,-73.730621&spn=0.356317,0.617294&z=11&iwloc=A]"]

Above code put in your post or page. you can see the google maps in your page.

Here is list of some wordpress plugins which will help you to integrate the google map in wordpress.

how to display or embed the google map in wordpress

Tweet Button is launched by Twitter

Twitter launched the new share button.  We always used the tweetmeme button for our wordpress blogs and sites.

Tweet Button is launched by Twitter

Tweet Button is launched by Twitter
Tweet Button is launched by Twitter

Button Twitter launched very nice twitter button which has very nice cool look and feel.

If you want to use the new twitter button in your wordpress site than use following code:

<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script></pre>
<div>php the_title(); ?>&via=YOUR_NAME">Tweet</div>
<pre></pre>
<pre>

you will see the button as like this.

If you want to add the big button as follows than use following code:

<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script></pre>
<div>php the_permalink() ?>" data-via="YOUR-NAME" data-text="<!--?php the_title(); ?-->" data-related="<!--?php the_tags( '', ', ', ''); ?-->" data-count="vertical">Tweet</div>
<pre></pre>
<pre>

What Twitter is saying about this button.

The Tweet Button is a small widget which allows users to easily share your website with their followers. This page is for developers and users who wish to build their own Tweet Buttons. If you are looking for a quick way to build a Tweet Button for your website you can visit our Tweet Button Goodies Page.

The user interaction flow for the Tweet Button was designed to be as streamlined as possible and easy to use for both developers, website owners and users.

The steps a user goes through when using the Tweet Button are:

  1. The user clicks the Tweet Button
  2. The user is asked to login to Twitter if they aren’t already. If the user is new to Twitter they can also create an account.
  3. The Share Box appears already completed with the information provided in the properties of the Tweet Button. The user can change the content if they wish.
  4. Posting of the Tweet is confirmed and the user is suggested a maximum of two accounts they may wish to follow as provided in the properties of the Tweet Button.
  5. The Share Box remains open until the user presses close.

You can get the Twitter button from following site

http://twitter.com/goodies/tweetbutton

Best firefox addons for increase developers productivity

Firefox is mostly used by programmers and developers and designers as well. Here we have Best firefox addons for increase developers productivity. Now these days Firefox become so popular and so many common people are also started using the firefox for daily basis.

Best firefox addons for increase developers productivity

Firefox provides the very useful plugins or you can call as addon. Here are the list of some very popular and useful firefox addon list for increase your productivity.

CookieSafe and Remove Cookies for Site

Best firefox addons for increase developers productivity
Best firefox addons for increase developers productivity

CookieSafe is a useful extension that allows you to block cookies quickly for any given site. You can also control cookie permissions on a global level.

Remove Cookies for Site on the other hand allows you to quickly delete cookies for any site from the context menu. We can’t live without this one, since it definitely saves a whole load of time.

FastDial

FastDial is a extension that brings a new feature to Firefox, which is available in Opera by default. FastDial replaces your home page
and allows you add and quickly access your favorite websites by displaying small thumbnails, clicking on which will take you to the website.

Though there may be several ways in which you can access your favorite websites, we prefer FastDial since it allows us to quickly access all our favorite sites when we open up a new tab.

Undo Closed Tabs Button

There are several times when we have closed a tab by mistake, it was quite a pain to go back to the history and find out which tab we had closed. Undo Closed Tabs Button is a real life saver since it allows you to open the last closed tab with just the click of a button.

ReminderFox

Since we spend a lot of time using Firefox, we prefer to use ReminderFox for several reasons. It definitely saved us a lot of time remembering birthdays, anniversaries, paying of cable and Internet bills and more without having to maintain another application
just for reminding us about important dates and events.

Download Statusbar


The default Firefox downloads window is pesky and keeps cropping up on us when a file starts to download and finishes downloading, we prefer to silence it once and for all using Download Statusbar a handy extension that will create a tiny little icon for downloads and put it in your statusbar.

Shareaholic


Shareaholic is a great add-on for clubbing in several social networking tools into one, you can easily digg a page, stumble it, add it to facebook, reddit it, tumble it, save it to del.icio.us and more.

Following Firefox Addons are useful for programmers,

FireBug


FireBug is a must have add-on for every web developer. Firebug allows you to easily edit, debug and monitor CSS, HTML and JavaScript for any web page.

Web Developer

Web Developer is a powerful extension for developers. It definitely makes developing web pages quite easy. You can modify CSS on the fly, see which layers are using which styles, modify cookies, play around with images and practically do anything you would want to do as a developer.

User Agent Switcher


User Agent Switcher quickly allows the user to change the user agent of the browser to see the behavior of web pages under different browsers.

Delicious Bookmarks

Delicious Bookmarks is the official Firefox add-on for Delicious, the world’s leading social bookmarking service (formerly del.icio.us). It integrates your bookmarks and tags with Firefox and keeps them in sync for easy, convenient access.

Screengrab

It will capture what you can see in the window, the entire page, just a selection, a particular frame… basically it saves webpages as images – either to a file, or to the clipboard. It captures Flash too!

ColorZilla

With ColorZilla you can get a color reading from any point in your browser, quickly adjust this color and paste it into another program. You can Zoom the page you are viewing and measure distances between any two points on the page. The built-in palette browser allows choosing colors from pre-defined color sets and saving the most used colors in custom palettes. DOM spying features allow getting various information about DOM elements quickly and easily. And there’s more…

If you think there are more good firefox plugin than please suggest me.

Do access the Linux Drives from Windows

Many times we have dual-boot os in computer. Data like file and videos or songs and important docs are spread under windows or linux.

Do access the Linux Drives from Windows

From linux accessing the windows drive there is no issue but from windows we did not easily access the linux drives.

Ext2 Installable File System for Windows

A bit better than the above tool, this utility can give you both read and write access to Ext2 and Ext3 Filesystems from Windows. Plus, once you have this installed, Windows can use it your Linux partition as a paging file as well.

rfsd: ReiserDriver

ReiserDriver allows access to ReiserFS partitions from Windows. The partitions appear like other filesystems, and can be accessed by any windows application. This is yet in kinda like pre-release stage, and installation should prove tedious for newbies.

DiskInternals Linux Reader

DiskInternals Linux Reader has a Windows Explorer like interface, and can provide access to Ext2 and Ext3 Linux partitions from Windows. You can extract files easily from those linux partitions to your Windows partitions.

how to open port 80 in linux iptables

Here we have linux tutorial for, how to open port 80 in linux iptables. Many times we need to open 80 port on linux box. Through command line opening the 80 or any port that is easy. In this tutorial I will how you can open the port 80.

how to open port 80 in linux iptables

how to open port 80 in linux iptables
how to open port 80 in linux iptables

Using following you can check the firewall setting of Linux.


[root@sonyk-pc project]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere            udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere            udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:bootps
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http state NEW
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:vnc-server
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:vnc-server
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:patrol-snmp state NEW
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:61613 state NEW
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             192.168.122.0/24    state RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     anywhere
ACCEPT     all  --  anywhere             anywhere
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Using following command you can open the port 80. using following command use 80 port will be open for 192.168.2.0 to 192.168.2.68 ip addresses.


[root@sonyk-pc project]# iptables -A INPUT -s 192.168.2.0/68 -d 192.168.2.16 -p tcp --dport 80 -j ACCEPT

using following command you can save the setting in iptables.


[root@sonyk-pc project]# restorecon -R /etc/sysconfig/iptables

[root@sonyk-pc project]# service iptables save

iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

Than restart the firewall using following command

[root@sonyk-pc project]# service iptables restart
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: nat mangle filte[  OK  ]
iptables: Unloading modules:                               [  OK  ]
iptables: Applying firewall rules: Using intrapositioned negation (`--option ! this`) is deprecated in favor of extrapositioned (`! --option this`).
Using intrapositioned negation (`--option ! this`) is deprecated in favor of extrapositioned (`! --option this`).
 [  OK  ]

Free abstract mobile wallpapers for iphone and mobile

Abstract designs are very much popular among the mobile and iphone users. Here I am going to give very nice and cool designs of abstract mobile wallpapers. I specially love to use abstract designs in my mobile.

Free abstract mobile wallpapers for iphone and mobile

For download you need to click on thumbnail picture and click on save button.

Free cars mobile wallpapers for iphone and mobile

People are crazy about cars and we all love cars so much. In Iphone and mobile also we love to see cars pictures so here I am giving you some cars wallpapers.

Free cars mobile wallpapers for iphone and mobile

For download you need to click on thumbnail picture and click on save button.