Comet freeze

7 views
Skip to first unread message

Андрей Губарев

unread,
Dec 3, 2011, 11:49:58 PM12/3/11
to nagare...@googlegroups.com
There is bug in comet.
When open many browser tabs with application alll inctances freeze. Tested with examples/chat.py
I think problem can be with incorrect server configuration.

apoirier

unread,
Dec 5, 2011, 10:59:11 AM12/5/11
to Nagare users

Hi,

The comet feature was mainly introduced for real-time communication
with the Nagare IDE, where normally only one tab is opened on it. This
current "naive" implementation blocks a thread both on the client and
in the server.

Safari and Firefox only allows 5 threads max. so you couldn't open
more than 5 tabs in each (the limit in Opera is much higher). To test,
launch several different browsers and you will be able to open more
tabs on your application.

On the server the number of available threads is given by the
parameter ``threadpool_workers`` of the publisher configuration file.
This value is 10 by default. To change it:

1. Create a publisher configuration file with:
[publisher]
threadpool_workers=<max number of threads>

2. Serve your application with this file:
nagare-admin serve -c <this_file> <your app>

A more robust comet implementation could use WebSockets on modern
browsers and a event-based HTTP server.

Regards,
Alain

Reply all
Reply to author
Forward
0 new messages