ruby on rails - Could performance issues imerge when using ActionCable in Production? -


i'm planning have rails app has content rich interactive page many users connect to.

development has went , small time testing on dev servers went without hitch either.

problems started when started alpha testing selected groups of people. sever grind halt suddenly. nginx stop because of queue being full. @ lose while, after looking around, came conclusion live actioncable eating memory.this gets bad when user reloads page multiple times subscribes actioncable, causing additional process become active, stopping server, being cured nginx reboot.

i run 2core 1gb memory ssd run vps server alpha testing, perhaps @ tops 20 concurrent users.should running performance problems such load? or should tuning code or redis, passenger fix this?

i know hard definitive things without more specifics, ballpark estimate done information?

20 concurrent users plus multiple tabs per user still less 100 concurrent websocket connections, not lot.

first thing i'd leaks - when reason websocket connection or other resources (open files etc.) not freed when actual user disconnects. make sure you're running fresh versions of rails/passenger, there bug in rails causing similar behaviour (see https://blog.phusion.nl/2016/07/07/actioncable-under-stress-p1/ details)

also while actioncable+passenger inside nginx allows run inside single process, not idea when expect load. when running clean nginx , separate rails servers regular requests , cable - @ least other parts of app continue kind of working in such conditions.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -