php - Worker process performing SOAP calls generates endless CLOSE_WAIT file descriptors -
i'm running php queue worker process processes jobs in turn create soap clients , perform soap requests. i'll try outline pseudo-code possible.
jobs , parameters saved database instantiated worker. in simplified form, worker looks this:
while(true) { $job = initiatefromdatabase($id); $job->handle() }
for job soapclient instantiated , soap call performed. results saved database.
the problem process pretty hit open file descriptor limit. after inspection lsof -a -p <worker_pid>
there hundreds of tcp descriptors hanging in close_wait.
i've done intensive research , conclusion there no way explicitly close soap connection (and underlying) socket.
the way clear hundreds of close_wait descriptors kill worker process.
how can make sure can run worker larger periods of time , make close_wait descriptors disappear after soapclient instance not used anymore?
thanks in advance.
Comments
Post a Comment