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

December 23, 2011

ngnix php apc memcached – connection stay active

Filed under: Linux — admin @ 10:58 am

Well, one client complain because the server start going to be verry slow. After a short look, I see that where over 20k ESTABLISHED connection from php-fpm to memcached server.

The main problem was that the server didn’t verify if have a connection active and every time was adding a new one.

After a short search we nottice that we have the stable version of memcached ( php module ) , and the new one have something like isPristine function, you won’t find anything on official documentation on pecl site.

So, the fix was to upgrade to memcached-2.0.0b2 .

How to upgrade memcached:

pecl uninstall memcached

pecl install memcached-2.0.0b2

After this you may use into php code  isPristine

 

 

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress