MySQL : Net packets out of order
A couple of weeks ago I come across an error which was very frustrating. I got this error when I try to connect a database with Toad or via Sphinx. I googled around alot to find an answer but the only answer I found out was in mysql forums which only declared that this is a "network problem". I even reinstalled mysql to find a fix for it. It didnt work.
So I rechecked every possible step that would cause a problem, and found out the problem started when I use mysql-dump output to load my data. I got the mysql-dump again and retired from my production server. It didnt work aswell. Then I tried yesterdays backups from production which worked fine. So what happened between yesterday and today that I get a net packets out of order error ?
I created a "view" !
Views, stored procedures, triggers are created with mysql users id and even though it can be recreated via backup its problematic if the user unique id doesnt match between servers.
So if you get a "net packets out of order" error, and if you got the error after a restore drop and recreate your views, stored procedures, triggers not to get an error in some programs (while others working perfectly well).
I saw the same error comes up in .NET aswell (while I am searching in google ), but I didnt really check if its caused by this error.
Php Error: Allowed memory size of 262144 bytes exhausted
Today I come across a php error I havent seen in ages.
"Allowed memory size of 262144 bytes exhausted"
I rechecked everything in php.ini / .htaccess / code on server. I saw nothing wrong at start. memory limit was set to 4gb and there was no lines in code which modifies this variable. So what was the problem ?
Then I thought what if php cannot allocate 4gb of memory ? Then set memory limit to 1gb and it worked. The problem was simple, if php cannot allocate the memory limit you set it goes to its default value while phpinfo is still showing 4gb.
Personal hackathlon accomplished
These 3-4 days I have been coding day and night testing my limits which I used to do all the time. I thought I was getting rusty, but I am happy to see I can still focus after 27 hours of nonstop coding (3 hours break and another 13 hours). To be honest this hackathlon cost me a lot healthwise. To stay awake and focused smoked too many cigarettes while working. Now I am trying to chillout a bit.
I wrote a small scalable custom search module for a heavy loaded site using sphinx / mysql / php / memcached. That was really fun and challenging: discovering the awesome changes in the new version of sphinx and try to apply it to the search module. Hopefully it would be live soon.
A new start
I just deleted my old wordpress instance and installed a new one. Hopefully new starts would give me a chance to have a regular blog at last. (I am keeping my hopes pretty high)