php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58568 persistent_id, Too many open files in system
Submitted: 2009-03-01 10:04 UTC Modified: 2009-07-27 12:34 UTC
From: whitephoenix at mail dot ru Assigned:
Status: Closed Package: memcached (PECL)
PHP Version: Irrelevant OS: FreeBSD
Private report: No CVE-ID: None
 [2009-03-01 10:04 UTC] whitephoenix at mail dot ru
Description:
------------
I tried to use persistent connection, persistent_id="mem", but it causes error "Too many open files in system".
`sysctl kern.openfiles`....



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-01 10:05 UTC] whitephoenix at mail dot ru
I'm using php-fpm fastcgi bus (http://php-fpm.anight.org).
 [2009-03-02 18:29 UTC] andrei@php.net
How many open files do you have before you try to instantiate Memcached() with persistent_id?
 [2009-07-27 05:36 UTC] yorgosun at gmail dot com
I got the same problem. seens persistent_id only share in 
each php-fpm process.

as you mentioned, libmemcached doesn't known which server 
already add into the list. so each process add the same 
server will get many connections?

I tested it when I just ran a php-fpm process. after many 
accessed with php page, there are thousands of connections 
ESTABLISHED with memcache server.

how to using persistent_id correctly? thanks for your hard 
work!
 [2009-07-27 12:34 UTC] andrei@php.net
Instantiate the class using persistent ID, then get the server list with getServerList(), check if the server is there already, if not, add it.

That's about it. It may be easier in the future.
 [2009-08-02 12:41 UTC] yorgosun at gmail dot com
I did that. but getServerList() always return null after 
instantiate the class.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Aug 07 13:01:24 2020 UTC