user3763125
user3763125

Reputation: 711

socketio client is sending thousands of GET requests django server as soon as the page is loaded

I am trying to develop a real time socket connection with django powered server built using gevent and greenlet. I started the server and the server is waiting on port 8000. But as soon as I load the page on the browser I see literally thousands of get requests (shown below) on the server terminal.

127.0.0.1 - - [2014-06-21 13:10:48] "GET /socket.io/?EIO=2&transport=polling&t=1 403370648069-19838 HTTP/1.1" 200 172 0.004000

127.0.0.1 - - [2014-06-21 13:10:48] "GET /socket.io/?EIO=2&transport=polling&t=1 403370648074-19839 HTTP/1.1" 200 172 0.003000

127.0.0.1 - - [2014-06-21 13:10:48] "GET /socket.io/?EIO=2&transport=polling&t=1 403370648078-19840 HTTP/1.1" 200 172 0.003000

127.0.0.1 - - [2014-06-21 13:10:48] "GET /socket.io/?EIO=2&transport=polling&t=1 403370648083-19841 HTTP/1.1" 200 172 0.003000

127.0.0.1 - - [2014-06-21 13:10:48] "GET /socket.io/?EIO=2&transport=polling&t=1 403370648065-19837 HTTP/1.1" 200 172 0.004000

I am using version 1.0.6 of socket.io-client (https://github.com/Automattic/socket.io-client).

thanks,

Upvotes: 5

Views: 311

Answers (1)

Matt Hamann
Matt Hamann

Reputation: 1638

I had this exact same problem, albeit with Express.IO on NodeJS and Socket.IO on the client side.

This issue will occur if the implementation versions of Socket.IO don't match between the client and server. For instance, there were a number of critical changes between Socket.IO v0.9 and v1.0. You need to either upgrade the one or downgrade the other.

Upvotes: 0

Related Questions