How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

December 15, 2011

Deleting mail in postfix queue (mailq)

Filed under: Linux — admin @ 10:43 am

Well another problem.

One friend call me  that his server can’t send / receive e-mails. After I got ssh logins I see with mailq that where more then 20000 e-mail on queue.

Well I decided to remove all e-mail from queue  but how to do this.

Well the magic command is :

postsuper -d ALL

this will erase all e-mail from mailq queue

If you want to remove just one e-mail id run

postsuper -d mailID

Hope will help someone.

December 14, 2011

upstream sent too big header while reading response header from upstream

Filed under: Linux — admin @ 11:50 am

In the post http://matrafox.info/firephp-on-nginx-zend_db_profiler_firebug-bad-gateway.html  i modiy

fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;

However after a few day I nottice that on firefox I have a lot of 502  bad gateway .  So after a short look on log I see

*62814 upstream sent too big header while reading response header from upstream

So, to fix this I increase the valuse to

fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

I see also that they can be even higher  something like

fastcgi_buffers 4 256k;
fastcgi_buffer_size 128k;

 

December 12, 2011

MySQL Error Messages: MySQL server has gone away

Filed under: Linux — admin @ 2:22 pm

Recently I have a huge problem. Some site stop working after a cpanel update ( we think ) .
Email client start to be slow, mysql give mysql server has gone away, some curl give us error.
After a few hour of research we find out that gethostbyaddr was the php function that kill the apps.
When we check our resolv.conf we see that one of the dns was working verry slow.
We exclude that, add google nameserver and everything was back to normal.
Also please check to not have your own server listed there.

Regards

FirePHP on Nginx zend_db_profiler_firebug Bad Gateway

Filed under: Linux — admin @ 2:00 pm

Well because we have switch from apache to nginx we encountered a new problem .
When we have enable zend_db_profiler_firebug we got “bad gateway” error.

One simple fix for this is to append bellow line into your virtual.conf of ngix.
# set these two: zend_db_profiler_firebug
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;

It should look something like this.

location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_param APPLICATION_ENV production;
# set these two: zend_db_profiler_firebug
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;

}

December 2, 2011

problem with ffmpeg /usr/local/lib/libbz2.a: could not read symbols: Bad value

Filed under: Linux — admin @ 3:11 pm

Again, try to reconfigure on another server ffmpeg, here I got another error.
/usr/local/lib/libbz2.a: could not read symbols: Bad value

/usr/bin/ld: /usr/local/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against `.text’ can not be used when making a shared object; recompile with -fPIC

After a little search I find out that on that server bzip was installed from sources not from package.
Only solution that work was to recompile bzip.
So i go into bzip directory, edit Makefile
and the line
CC=gcc
I modify it into
CC=gcc -fPIC
save the file
make clean
make
make install
And after that the ffmpeg was good to go.

« Newer PostsOlder Posts »

Powered by WordPress