|  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
I tried to use persistent connection, persistent_id="mem", but it causes error "Too many open files in system".
`sysctl kern.openfiles`....


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-01 10:05 UTC] whitephoenix at mail dot ru
I'm using php-fpm fastcgi bus (
 [2009-03-02 18:29 UTC]
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 
 [2009-07-27 12:34 UTC]
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-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 12 22:01:29 2024 UTC