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

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.

install ffmpeg with librtmp problem

Filed under: Linux — admin @ 10:22 am

Well some day I have to install ffmpeg with librtmp. Well you have to download rtmpdump and configure and install it. However the problem that I want to talk here is about one error that he encountered.
Even I have installed rtmpdump, when I try to configure ffmpeg I got this error:
” cannot find librtmp ”
After a little search I find out that the problem was actuly that pkgconfig was missing. I have try yum install pkgconfig however didn’t find anything.
A sort fix was to locate librtmp.pc, find the path to it and after this to do this

export PKG_CONFIG_PATH=”${PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig”

After that I have the ffmpeg with librtmp installed.

« Newer PostsOlder Posts »

Powered by WordPress