Hi Andreas. 1) As far as I remember from a discussion with Alex it's a "hard limit" (OS related).
2) Line 369 - 372 here: https://bitbucket.org/hsarvell/pl-web/src/c445ca3861159d0b28ea779a183572c91b7b8458/pl-web.l?at=default On Fri, Jun 26, 2015 at 9:50 PM, <andr...@itship.ch> wrote: > Hi Henrik > > Awesome! That's really cool, thank you for your effort and for sharing the > code :-) > 20k message with nearly zero server load sounds very impressive. > > Question: >> To work around the inter-process limit of 4096 byte long messages the >> router now supports storing the messages in Redis > > 1) Where comes this limit from? > POSIX IPC? PicoLisp IPC ? > > 2) I couldn't find the redis part in the code, maybe you can give me a hint > where to look? > > > Thanks, your work on websockets will definitely help me in in the future :-) > - beneroth > > > > ----- Original Message ----- > From: Henrik Sarvell [mailto:hsarv...@gmail.com] > To: picolisp@software-lab.de > Sent: Fri, 26 Jun 2015 21:30:58 +0200 > Subject: > > Hi all, after over a month without any of the prior issues I now > consider the websockets part of pl-web stable: > https://bitbucket.org/hsarvell/pl-web Gone are the days of 100% CPU > usage and zombie processes. > > With Alex's help the main web server is now more stable (he made me > throw away a few throws in favour of a few byes). The throws were > causing the zombies. > > I was also including dbg.l (it was causing hung processes at 100% > CPU), it's basically been deprecated or something, I'll leave it up to > him to elaborate. It's just something I've been including by habit > since years ago when at some point I needed to include it to do some > kind of debugging. > > Anyway atm the WS router is regularly routing up to 40 messages per > second to upwards 300-500 clients which means that roughly 20,000 > messages are being pushed out per second during peak hours. > > The PL processes show up with 0 CPU and 0 RAM usage when I run top, > sometimes 1% CPU :) They hardly register even i aggregate, the server > would be running 99% idle if it was only running the WS server. > > To work around the inter-process limit of 4096 byte long messages the > router now supports storing the messages in Redis (raw disk is also > supported if Redis is not available), this is also in effect in > production and is working flawlessly since months. > > This is how I start the WS server in production: > > (load "pl-web/pl-web.l") > > (setq *Mobj (new '(+Redis) "pl-ws-")) > > (undef 'app) > > (setq *WsAuth '(("notifications" (("send" ("put your password/key here")))))) > > (de app () > (splitPath) > (wsApp) > (bye)) > > (de go () > (wsServer) > (server 9090) ) > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe > -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe