Good morning, I wrote to the list some time ago due to this topic. I have noted that when a user asks to disconnect his/her sessions (imap sessions normally the disconnected ones) after some time like an hour or a half an hour passes I start having some slow responses to new connections. I have monitored them and it's slightly intermittent, KO and OK of server responding alert in less than 3 seconds. This intermittency lasts like 10 minutes and later the response delays increase. Obviously for avoid bigger service outages I stop and start Cyrus and all works fine later. I have been trying to figure why it could be happening because I have seen it only happens when I launch TERM for a disconnection to several imap proccesses (the user that requested proccesses). It doesn't happen at the moment. As said for instance yesterday happened when an hour passed of the disconnection. I don't have prefork param set in cyrus.conf, so... Cyrus spawns on demand. After doing some examinations my theory is that perhaps Cyrus is not calling spawn_service() every time gets needed. I would say it should happen in master.c : 2610 if (!in_shutdown && Services[i].exec && I think that perhaps ready_workers is not properly decremented when I launch this TERM and perhaps this causes Cyrus not to spawn any new more services of the kind of the terminated service. As yesterday happened in a more or less peak accesses hour it needed to have more services spawned but... as it seen ready_workers not to be 0 for that service... it didn't spawn new more services and as consequence, connections started becoming queued in being accepeted awaiting that happened when a proccess gets idle because it's client has disconnected or idled timeout or imap timeout happened.... So, I was wondering if in reap_child() for the states SERVICE_STATE_UNKNOWN and SERVICE_STATE_BUSY shouldn't be decremented the ready_workers in the service struct... Concretely in master.c in : 1121 case SERVICE_STATE_BUSY: Obviously, another possible solution is to specify prefork in cyrus.conf but I'd rather avoid wasting memory when it's not needed... What's your opinion mates?. Or what do you think Ellie, Bron :) . Have you ever seen something like it?. Cheers! |