When client connect to server ping to server where is node.js quickly jump, for example from 40ms to 300ms only when user connect with node.js server. So every time the client connects to the server ping goes to 300ms.
I use mysql, socket.io and emailjs node modules.
Transports: io.set('transports', ['websocket', 'flashsocket', 'htmlfile', 'xhr-polling', 'jsonp-polling']);
Did anyone had similar problems?
Thanks in advance. Best regards.
The most common problem is when someone connects, your logic in node.js blocks and holds execution cursor, and then releases it after some delay that involves every other callback to wait.
As node is async and single threaded process, you should avoid any blocking operations as much as possible. Use async operations with MySQL, and make sure all your internal logic is not blocking.
Although more information regarding your logic would be helpful.