portableaserve threads problems
I've been using portableaserve with Lispworks 5.1 on MacOS 10.5.8 for years without incident, but three months ago switched to Lispworks 6.0 and have now this problem, as seen in the server log: 71.163.186.9 - - [Thu, 15 Mar 2012 17:19:14 GMT] "POST /klaggle HTTP/ 1.1" 200 -1 71.163.186.9 - - [Thu, 15 Mar 2012 17:19:55 GMT] "POST /klaggle HTTP/ 1.1" 200 -1 71.163.186.9 - - [Thu, 15 Mar 2012 17:20:47 GMT] "POST /klaggle HTTP/ 1.1" 200 -1 aserve-accept-6: 03/15/12 - 13:20:56 - all threads busy, pause aserve-accept-6: 03/15/12 - 13:20:57 - all threads busy, pause aserve-accept-6: 03/15/12 - 13:20:58 - all threads busy, pause aserve-accept-6: 03/15/12 - 13:20:59 - forced to create new thread aserve-accept-6: 03/15/12 - 13:20:59 - can't even create new thread, quitting The problem is happening more and more frequently, with MTBF down to 2 days now, even with sparse server load. I suspect the problem is that old threads do not get relinquished after connections are dropped. The section of code which produces the errors is main.cl: (let ((looped 0)) (loop (if* (null workers) then (case looped (0 nil) ((1 2 3) (logmess "all threads busy, pause") (sleep 1)) (4 (logmess "forced to create new thread") (make-worker-thread)) (5 (logmess "can't even create new thread, quitting") (return-from http-accept-thread nil))) (setq workers (wserver-worker-threads server)) (incf looped)) (if* (accept-thread-maybe-activate-worker-thread (car workers) sock) then (atomic-change-wserver-free-workers server nil) (return) ; satisfied ) (pop workers))) Has anyone any suggestions for how to prevent this problem? Lawrence Au Sauriel LLC