Monday, January 21, 2019

MYSQL and New IP for Master in Replication

There comes a time you might need to change the IP of a Master in a MySQL Replication setup. The steps are fairly simple.

You will need to know the IP of the Master.

Important!
When you’re using CHANGE MASTER TO to set start position for the slave you’re specifying the position for SQL thread and so you should use Relay_Master_Log_File:Exec_Master_Log_Pos. 
Otherwise, you’re going to ruin your replication.

SSH into the MYSQL SLAVE and run SHOW SLAVE STATUS
Slave_IO_State: Reconnecting after a failed master event read
Master_Host: 10.0.0.1
Master_User: replicate
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: binlog.002933
Read_Master_Log_Pos: 832187423
Relay_Log_File: mysql-relay-bin.000230
Relay_Log_Pos: 832187707
Relay_Master_Log_File: binlog.002933
Slave_IO_Running: Connecting
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 832187423
Relay_Log_Space: 832188044
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 2003
Last_IO_Error: error reconnecting to master 'replicate@10.0.0.1:3306' - retry-time: 60  maximum-retries: 86400  message: Can't connect to MySQL server on '10.0.0.1' (110 "Connection timed out")
Last_SQL_Errno: 0
 Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_SSL_Crl:
Master_SSL_Crlpath:
Using_Gtid: No
Gtid_IO_Pos:
Look for the values

  • Read_Master_Log_Pos:
  • Exec_Master_Log_Pos:
These should be the same, note them and note Relay_Master_Log_File

  • Exec_Master_Log_Pos: 832187423
  • Relay_Master_Log_File: binlog.002933
SSH into SLAVE and run SHOW SLAVE STATUS
STOP SLAVE
CHANGE MASTER TO MASTER_HOST='xxx.xxx.xxx.xxx', MASTER_LOG_FILE='binlog.002933', MASTER_LOG_POS=832187423;
START SLAVE
SHOW SLAVE STATUS
Reference

Thursday, April 19, 2018

Paypal




  1.  Log in to your PayPal account at https://www.paypal.com. The My Account Overview page appears. 
  2. Click the Profile subtab. 
  3. The Profile Summary page appears. Click the My Selling Tools link in the left column. 
  4. Under the Selling Online section, click the Update link in the row for Website Preferences. The Website Payment Preferences page appears 
  5. Under Auto Return for Website Payments, click the On radio button to enable Auto Return. 
  6. In the Return URL field, enter the URL to which you want your payers redirected after they complete their payments. 


NOTE: PayPal checks the Return URL that you enter.
 If the URL is not properly formatted or cannot be validated, PayPal will not activate Auto Return.

Scroll to the bottom of the page, and click the Save button.

References



Friday, June 16, 2017

Sleeping MySQL threads

Saw this interesting script on how to deal with sleeping MySQL connections. From the beginning I would say this should only be used as a temporary solution until you can fix the real issue.

I have modified the original script somewhat.

$link = @ mysql_connect('localhost', 'xxxx', 'xxxxxxxx');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully'."\n";

$result = mysql_query("SHOW processlist");
while ($myrow = mysql_fetch_assoc($result)) {
if ($myrow['Command'] == "Sleep" && $myrow['Time']>0 && $myrow['User']!="root") {
//if ($myrow['Command'] == "Sleep" && $myrow['Time']>0) {
//mysql_query("KILL {$myrow['Id']}");
echo  $myrow['User']." ".$myrow['Command']." ".$myrow['Time']." ".$myrow['State']."\n";
if($myrow['Time']>20){
//mysql_query("KILL {$myrow['Id']}");
echo "Killed process id: ". $myrow['Id']."\n";
}
}
}
mysql_close($link);
?>
For starters you can see all the sleeping MySQL processes by running the command
show processlist
You will need to look out for all the threads with state being 'sleep. MySQL 5.1.7 allows filtering  For e.g. you can find  sleeping processes running over 5 seconds using the command below.
SELECT user, time, state, info FROM information_schema.processlist WHERE command = 'Sleep' AND time >5 ORDER BY time DESC, id;

What causes

Most sleeping MySQL connections are caused by queries initiated client side that not be properly closed on the clients side. Most times these are cleaned up by wait_timeout variable. Sometimes depending on the query a sleeping connection can lock up a table (MyISAM) or row(InnoDB) and lead to problems especially to the timeouts are high and the number of connections waiting on the locked resource,

References



Monday, August 29, 2016

Varnish Statistics One-liners

Varnish Command Line
 
Here are some useful examples of varnishtop and varnishlog at work.

Displays a continuously updated list of the most frequently requested URLs:
varnishtop -i RxURL
varnishlog -c | grep 'RxURL'

Top requests to your backend. This shows only the "TxURL", the URL being retrieved from your backend.
varnishtop -i TxURL
varnishlog -b | grep 'TxURL'

#See what cookies values are the most commonly sent to varnish.
varnishtop -i RxHeader -I Cookie
varnishlog -c | grep 'Cookie: '

#Which host is being requested the most. Only really useful when you're serving multiple hosts in Varnish.
varnishtop -i RxHeader -I '^Host:'
varnishlog -i RxHeader | grep 'Host: '

#Accept-Encoding will show the most popular Accept-Encoding header the client are sending you.
varnishtop -i RxHeader -I

See what useragents are the most common from the clients
varnishtop -i RxHeader -C -I ^User-Agent

See what user agents are commonly accessing the backend servers, compare to the previous one to find clients that are commonly causing misses.
varnishtop -i TxHeader -C -I ^User-Agent

See what accept-charsets are used by clients
varnishtop -i RxHeader -I '^Accept-Charset

Listing all details about requests resulting in a 500/404 status:
varnishlog -b -m "RxStatus:500"
varnishlog -b -m "RxStatus:404"







References
  • http://book.varnish-software.com/3.0/Getting_started.html
  • https://www.varnish-cache.org/docs/3.0/reference/varnishlog.html
  • https://www.varnish-cache.org/docs/3.0/reference/varnishtop.html
  • https://www.varnish-cache.org/docs/3.0/tutorial/increasing_your_hitrate.html
  • https://www.varnish-cache.org/docs/3.0/tutorial/logging.html#tutorial-logging
  • https://ma.ttias.be/useful-varnish-3-0-commands-one-liners-with-varnishtop-and-varnishlog/
  • http://stackoverflow.com/questions/13247707/how-to-read-output-of-varnishtop
  • http://www.eldefors.com/varnish-command-line-tools/
  • https://www.varnish-cache.org/trac/wiki/

Wednesday, August 24, 2016

Request Entity Too Large Solution

Stumbled across this issue of request entity too large when trying a script on server is trying to upload large files.  This referrers to  Apache/NGINX/IIS servers running PHP.


The solution seems to lie in the change the following variables.

memory_limit =128M
post_max_size = 96M
upload_max_filesize = 64M

Test and increase the above variables slowly by 16/32M increments to ensure your web hosting can handled

If you are on NGINX you will need to adjust client_max_body_size in the http block of the config file

The error,  '413 Request Entity Too Large'.

http {
    #...
        client_max_body_size 128m;
    #...
}


Note 'post_max_size integer' sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than 'upload_max_filesize'. Generally speaking, 'memory_limit' should be larger than 'post_max_size'.

You might also want to increase the max-execution-time. Note however you server configurations, i.e. timeouts, might interrupt executions.

Thursday, August 18, 2016

Varnish and SEO

Varnish is a a great caching solution but it can do more. With Search Engine Optimisation it is always recommended that you have one base URL,often referred to as a Canonical URL,  either www.mysample or mysample domain. Some website owners even have multiple domains. The snippets below show how you can redirect www/non-www to non-www/www and or multiple domains to a Canonical URL.

Varnish 3
in sub vcl_recv add close to the top
    if (req.http.host == "www.mysample.com" || req.http.host == "my-sample.com" || req.http.host == "www.my-sample.com") {
        set req.http.host = "mysample.com";
        error 750 "http://" + req.http.host + req.url;
    }
in sub vcl_error add
   if (obj.status == 750) {
        set obj.http.Location = obj.response;
        set obj.status = 301;
        return(deliver);
    }
Varnish 4
in sub vcl_recv add
    if (req.http.host ~ "^www.mysample.com") {
        return (synth (750, ""));
    }
in sub vcl_synth
    if (resp.status == 750) {
        set resp.status = 301;
        set resp.http.Location = "http://mysampele.com" + req.url;
        return(deliver);
    }
Actually I like the implementation in Varnish 4 better. As you can make all the related changes at one place instead at 2 locations in Varnish 4. This also helps improving your memory used as only a single option is stored in cache instead of one for www.mysample.com/index.html and another for mysample.com/index.html

Hope this helps someone

Source
How to redirect non-www URLs to www in Varnish

Monday, January 25, 2016

SSH and Multiplexing

Recently I worked a project that required the transfer of data between servers using RSYNC at regular intervals. One of the things I noticed was that after awhile the number of open SSH processes started to increase. This as each new RSYNC session would open its own connection. I started wondering if those SSH connections could be reused/re-opened

Then I discovered there was a way to configure SSH to reuse the open TCP connection rather that setting up an new one. This comes with a big advantage as the overhead of creating a new TCP connection is now eliminated. This results in faster connection time and transfer of data.

To configure you will need to edit the SSH config file for the respective user account (~/.ssh/config)
Host x.x.x.x
  ControlMaster auto
  ControlPath ~/.ssh/sockets/%r@%h-%p
  ControlPersist 1800 
What do these options mean?

  • Host x.x.x.x # the IP/Domain name  of the server you are connecting to. You can opt to use the wildcard * but I prefer being specific and offers some security
  • ControlMaster auto #The default is no. So you have to specify either "yes","auto","ask","autoask".
  • ControlPath ~/.ssh/sockets/%r@%h-%p #Make sure the path exist. Create the folder and secure. %h - target hostname, %r - remote username, &%p - port. Other variables include %L,%l, %n & %u.
  • ControlPersist 3600  #How long the the master connection remains open before timing out due to inactivity. Defaults to seconds but can be expressed as 60m or 1hr

You can have multiple blocks
Host 1.1.1.1
  ControlMaster auto
  ControlPath ~/.ssh/sockets/%r@%h-%p
  ControlPersist 1800 
Host 2.2.2.2.
  ControlMaster auto
  ControlPath ~/.ssh/sockets/%r@%h-%p
  ControlPersist 1800 
All commands that use SSH, e.g. RSYNC, SCP, SFTP, will benefit from multiplexing. It should be noted that Multiplexing allows a a maximum of 10 open sessions per connection by default. You can increase this number  by changing the value of MaxSessions.  If you have a large number of connections you might need to change MaxStartups.

References

Monday, January 18, 2016

MySQL Replication and slave_net_timeout

In an article written in 2009, Jeremy Zawodny took on the MYSQL default for slave_net_timeout among other settings. Daniel Schneller, author of MySQL Admin Cookbook,  had written about his experience in 2006.

What is slave_net_timeout

It is the time in seconds for the slave to wait for more data from the master before considering the connection broken, after which it will abort the read and attempt to reconnect. The retry interval is determined by the MASTER_CONNECT_RETRY open for the CHANGE MASTER statement, while the maximum number of re-connection attempts is set by the master-retry-count variable. The first reconnect attempt takes place immediately.

For installations before MySQL 5.7 the default value for slave_net_timeout is 3600 seconds or 1 hour but as of  MySQL 5.7 it is 60 seconds. MariaDB still has 3600 seconds as the default.

The problem is summed up in the following statement.
When the network connection between a master and slave database is interrupted in a way that neither side can detect (like a firewall or routing change), you must wait until slave_net_timeout seconds have passed before the slave realizes that something is wrong. It will then try to reconnect to the master and pick up where it left off. This is bad. This could be 1 hour if the slave_net_timeout is set to 1 hour (3600 seconds)
I discovered this issue when I noticed the slave was not up to date but there were no errors. However if the slave was stopped (STOP SLAVE) and started (START SLAVE), suddenly replication started again and everything was up to date.

Before the restart the following would be noted. The  Read_Master_Log_Pos and Exec_Master_Log_Pos values did not match the log position (Show Master Status) on the master server.  On the slave, the Slave_IO_State is "Waiting for master to send event",  the Slave_IO_Running and Slave_SQL_Running values are both are "Yes". The Master_Log_File and Relay_Master_Log_File matched. In essence don't trust "Show Slave Status" alone.

The solution is to lower slave_net_timeout  to a more reasonable value 60 - 300 seconds.

Other values worth looking include:
  • skip-name-resolve -  enable and use IPs only in Grants
  • connect_timeout - Set higher than default
  • max_connect_errors - Set to High value
  • interactive_timeout - set to 300 seconds. Just lower that 28800 seconds
  • wait_timeout  - set to 300 seconds. Just lower that 28800 seconds
The last two have been of concern to Eliot Kristan since 2006.

As usual make one configuration change (or related changes only)  at a time in order to monitor and evaluate the effectiveness of the change.

References
  1. Fixing Poor MySQL Default Configuration Values
  2. Eliot Kristan - MySQL wait_timeout default is set too high!
  3. Some Reasonable Defaults for MySQL Settings 
  4. MySQL replication timeout trap
  5. MariaDB- Replication and Binary Log Server System Variables
  6. MySQL -  Replication Slave Options and Variables
  7. MySQL lowering wait_timeout value to lower number of open connections
  8. Changing MASTER_CONNECT_RETRY - Anything pit falls to keep in mind? 
  9. MySQL replication hung after slave goes offline and comes back online again

Monday, January 11, 2016

Removing Directories older than x days

I have setup where directories are created daily for the given date in the following format, yyyymmdd and content placed there for temporary access.

After a while this content becomes stale and can be deleted.

The holding folder is
/home/user/holding/

and the folders created are
/home/user/holding/20151221
/home/user/holding/20151222
/home/user/holding/20151223

I want to delete directories older than x days

The following commands will delete files only and not the directories.
/usr/bin/find /home/user/holding/ -type f -mtime +5 | /usr/bin/xargs rm
/usr/bin/find /home/user/holding/ -type f -mtime +5  -exec rm -rf {} \;
To delete directories and files included, modify the above and change rm to rm -rf
/usr/bin/find /home/user/holding/* -mtime +5 | /usr/bin/xargs rm -rf
Note the asterisk and the removal of  "-type f"

Testing

Checking with -mmin +1 i.e. files/directories modified over 1 min ago. Always test what you are going to delete before proceeding.

/usr/bin/find /home/user/holding/* -mmin +1
/home/user/holding/20151221
/home/user/holding/20151222
/home/user/holding/20151223

/usr/bin/find /home/user/holding/ -mmin +1
/home/user/holding/
/home/user/holding/20151221
/home/user/holding/20151222
/home/user/holding/20151223
Therefore to delete the folders/directories in /home/user/holding/ and not /home/user/holding/ itself use /usr/bin/find /home/user/holding/*

Complete
Using with cron to delete folders older than x days, in this case 5, use the following.
0 6 * * *  /usr/bin/find /home/user/holding/* -mtime +5 |  /usr/bin/xargs rm -rf  > /dev/null

Note be very careful with rm -rf. It can wipe out your entire system if incorrectly used. Always test what you want to delete before attempting to do so

Sunday, October 04, 2015

Search for files on Linux, Freebsd by type, content, size and date

The Linux offers a number of tools that can be used on the command line. I have found the following useful

Find files with certain text
grep -r "Text to find" PATH
e.g. grep -r "bad text" /home/user/www/
If you just want the file names
grep -r "Text to find" PATH | cut -d: -f1
e.g.  grep -r "bad text" /home/user/www/ | cut -d: -f1
If you want to find certain files
find . -type f -name "101.php"
for a case insensitive search
find . -type f -iname "101.php"
Wildcards work too
find . -type f -name "*.php"
for a case insensitive search
find . -type f -iname "*.php"
Suppose you want to find all the files modified between a certain dates. This works

touch -t yyyymmddhhmm tempfile1
touch -t yyyymmddhhmm tempfile2
find /www/ -type f -newer tempfile1 -not -newer tempfile2
e.g.
touch -t 201510010000 /tmp/startfile
touch -t 201510010000 /tmp/endfile
find /www/ -type f -newer /tmp/startfile -not -newer /tmp/endfile
Find specific files, e.g. php files, between certain dates

touch -t yyyymmddhhmm tempfile1
touch -t yyyymmddhhmm tempfile2
find /www/ -type f -name "*.php" -newer tempfile1 -not -newer tempfile2
e.g.
touch -t 201510010000 /tmp/startfile
touch -t 201510010000 /tmp/endfile
find /www/ -type f -name "*.php"  -newer /tmp/startfile -not -newer /tmp/endfile
 References

Sunday, August 23, 2015

Twitter Username/handle limited to 15 characters

Recently I discovered that Twitter username's have a 15 character limit. It just one of those things you did not know or note. It makes sense given that Twitter wants you to say what you have to in 140 characters. A reply to @twitterusername(a name that just made its 15 character limit) takes up 16 characters of the 140, the Twitter limit for posts.

I searched to confirm, and a writer at "The Curious Engineer" confirmed by my new finding.

Goes to the truth that you learn everyday.

Reference



Tuesday, June 09, 2015

Centos7 changes from Centos 5 & 6

I have not yet started playing around with CENTOS 7. However,  I was scanning an article 
on Digital Ocean and saw this command "systemctl restart httpd" and it peaked my interest.

It seems in CENTOS 7 you there is a little change in the commands to restart services and how services are configured to start automatically or not on reboots.

So if you have a service called mybuzz instead of

  • "service mybuzz restart" it is now "systemctl restart mybuzz"
  • "service mybuzz restart|start|stop|status|reload|condestar|status" it is now "systemctl restart|start|stop|status|reload|condestar|status mybuzz" respectively
For chkconfig the changes are not that simple. The cheatsheet below will be useful
  • "chkconfig mybuzz on" it is now "systemctl enable frobozz"
  • "chkconfig mybuzz off" it is now "systemctl disable frobozz"
  • "chkconfig mybuzz " it is now "systemctl is-enabled frobozz" (check if service is configured to start or not)
References



Sunday, April 26, 2015

Got fatal error 1236 from master when reading data from binary log

Today I encountered a MySQL replication error but thanks to Percona's Muhammad Irfan excellent blog the solution was quick and easy. While the error occurred with a MariaDB setup the MySQL instructions applied.

The error

Slave_IO_Running: No
Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event 'binlog.000202' at 307396531, the last event read from 'binlog.000202' at 4, the last byte read from 'binlog.000202' at 4.', Internal MariaDB error code: 1236 
It appear there was some issue on the server hosting the MariaDB and the server administrator opted to reboot. When the server restarted, replication stopped working.

Solution

On the Master
Firstly, on master, confirm that it is the end of the binary log. Browse to the directory

cd /var/lib/mysql (location will vary depending on your installation)
mysqlbinlog --base64-output=decode-rows --verbose --verbose --start-position=307396531 binlog.000202
I also peaked on the next log binlog.000203
mysqlbinlog --base64-output=decode-rows --verbose --verbose --start-position=0 binlog.000203
On the Slave
Stop the slave
All seems well, so I proceeded change the master log and master log position
CHANGE MASTER TO MASTER_LOG_FILE='binlog.000203', MASTER_LOG_POS=4;
Start the slave 
Once done, check the Slave Status and all should be well.
show slave status\G;
Please note that your binlog is e.g. mysql-bin.001 advance to the next log file mysql-bin-002

Why did this happen? According to Muhammad
I foresee master server crashed or rebooted and hence binary log events not synchronized on disk. This usually happens when sync_binlog != 1 on the master. You can investigate it as inspecting binary log contents as below:
user yogesh77 on the Percona Forum expanded this
"After sudden reboot mysql rolled back last transactions in binary logs however slave already incremented its binary position so after master is up slave is not able to get correct binary position. To resolve this issue you need to point slave to new binary file created after the server reboot and mysql restart. The same issue happened to be just 2 days back. After setting new binary position I skipped few entries on slave which were updated on slave and rolled back in binary position."
How to prevent
The suggestion is this little command.

On the master
SET GLOBAL sync_binlog=1;
Add to my.cnf or server.cnf for MariaDB to make permanent.
sync_binlog=1;
Also, try shutting down the server gracefully.

However there is a issue with sync_binlog. It appears enabling on certain file systems results in a significant performance hit. That discussion will have to be for another blog. Some discussions seem to indicate that it is getting better

n.b. If you have MYSQL replication set up, monitor it and have alerts emailed to you. Replication is a nice feature but must be monitored.

References

Wednesday, March 04, 2015

PHP Tuning - realpath_cache_size integer and realpath_cache_ttl integer

Two interesting directives available since PHP 5.1 are

  1. real_cache_size
  2. real_cahe_ttl

The given definitions are as follows.

realpath_cache_size integer - Determines the size of the realpath cache to be used by PHP. This value should be increased on systems where PHP opens many files, to reflect the quantity of the file operations performed.
The size represents the total number of bytes in the path strings stored, plus the size of the data associated with the cache entry. This means that in order to store longer paths in the cache, the cache size must be larger. This value does not directly control the number of distinct paths that can be cached.
The size required for the cache entry data is system dependent.
realpath_cache_ttl integer - Duration of time (in seconds) for which to cache realpath information for a given file or directory. For systems with rarely changing files, consider increasing the value.
One user on a Reddit Thread  seems to suggest that on enabling he got 50-70% increase in performance. That is significant. What I am not sure is how it works with APC.


References

Sunday, January 25, 2015

Using Varnish to block access to specific folders

If you ever need to block folder or folders using Varnish Cache, here are the simple steps.

Edit  sub vcl_recv and add the following
sub vcl_recv {
  # Ban outside access to #/user, /admin etc
  # works if you : if (req.url ~ "^/user" || req.url ~ "^/admin") {
  if ( (req.url ~ "^/user" || req.url ~ "^/admin" ) && !client.ip ~ yourallowedip) {
      # Have Varnish throw the error directly.
       error 405 "Sorry";
    }
#Other code
#....
}
Create...
acl yourallowedip {
    "1.1.1.1";
}
Restart varnish and you will be good to go.

service restart varnish

It is always good to test your configuration before restarting Varnish. The command to do is below. It there is an error it will let you know otherwise you will get a long display.

varnishd -C -f /etc/varnish/default.vcl

References

Thursday, July 31, 2014

Verify Facebook Page

Recently I was asked how do you I get a Facebook Page verified. The simple answer is at this time, your page is  at the mercy of Facebook. According to Facebook, the focus is on celebrities, journalists, government official and  popular brands or  business. If you are not in one of those categories, you are out of luck.

Everyone wants to see the Facebook Verification Badge For more information you can visit this the "What's a verified profile or Page" page on Facebook.

I am are sorry I don't have better news, but I hope the the information helps.

Friday, March 08, 2013

MapBox and Elections

I have always been interested in election results. What is even more fascinating is how the media presents these results. This is an interesting article on how Mapbox helped USAToday  present the 2012 USA elections to its internet audience

http://mapbox.com/blog/election-mapping-usatoday/

Monday, January 21, 2013

Saturday, August 18, 2012

Mysql and Innodb





http://forums.cpanel.net/f189/best-optimization-my-cnf-269391.html
part about query cache limit not right

Interesting take
http://www.trinitycore.org/f/topic/448-best-thread-cache-size-value/

http://dev.mysql.com/doc/refman/4.1/en/server-parameters.html


second paragraph
http://dev.mysql.com/doc/refman/4.1/en/table-cache.html

Usefull tool
http://www.mysqlcalculator.com/

skip-bdb
http://mysql.rjweb.org/doc.php/memory
http://www.tutorialspoint.com/mysql/mysql-database-tuning.htm


http://stackoverflow.com/questions/8665233/mysql-thread-cache-size-reduce-cpu-and-max-connection
http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html
http://jayant7k.blogspot.com/2009/09/innodb-configuration-and-optimization.html
http://www.tutorialspoint.com/mysql/mysql-database-tuning.htm
http://drupal.org/node/51263 - Tuning Mysql
http://www.highperfmysql.com/
http://serverfault.com/questions/354299/picking-the-right-innodb-buffer-pool-size?rq=1
http://serverfault.com/questions/316137/mysql-innodb-problem?rq=1  -> Very Goood
http://serverfault.com/questions/253059/mysql-innodb-optimisation?rq=1
http://serverfault.com/questions/220164/changing-innodb-buffer-pool-size-makes-error?rq=1


http://www.justin.my/2010/09/optimize-only-fragmented-tables-in-mysql/
http://dev.mysql.com/doc/refman/5.0/en/innodb-tuning.html
http://www.mysqlperformanceblog.com/2007/11/03/choosing-innodb_buffer_pool_size/
http://www.mysqlperformanceblog.com/2007/11/01/innodb-performance-optimization-basics/
http://mysqltuner.pl/mysqltuner.pl
http://openx.com/docs/whitepapers/performance-tuning
http://meinit.nl/optimize-only-fragmented-tables-mysql

Friday, August 17, 2012

MYSQL and TCP Wait isses



http://support.microsoft.com/kb/137984
http://blogs.technet.com/b/janelewis/archive/2010/03/09/explaining-close-wait.aspx
http://blogs.msdn.com/b/spike/archive/2008/10/09/tcp-connections-hanging-in-the-close-wait-and-fin-wait-2-state.aspx
http://bugs.mysql.com/bug.php?id=40662
http://books.google.com.jm/books?id=BL0NNoFPuAQC&pg=PA330&lpg=PA330&dq=net.ipv4.tcp_fin_timeout++mysql+tuning&source=bl&ots=COTOvpvG3U&sig=ID_ccSr1DHOePEjlkXiGaq_UuhA&hl=en&sa=X&ei=3jUuUMOgNLH7yAHRmICQCw&redir_esc=y#v=onepage&q=net.ipv4.tcp_fin_timeout%20%20mysql%20tuning&f=false

Robots.txt and Search Engines

It is not sexy but it useful. The robots.txt is suppose to tell robots/bots/crawlers where they can crawl on a web site. The robots.txt mus...