question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Connection error : EAGAIN

See original GitHub issue

Issue Description

Sequelize issues EAGAIN error randomly

What are you doing?

Stressful event of multiple file uploadings in parallel at high bandwidth

What do you expect to happen?

Not to crash

What is actually happening?

This

Additionnal information

Can’t be replicated easily, so no minimal example, sorry. It only seems to happen when connections are throttled by the server.

Environment

  • Sequelize version: sequelize@5.19.4
  • Node.js version: v8.16.1
  • Operating System: SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux in Vagrant box

Issue Template Checklist

How does this problem relate to dialects?

  • I think this problem happens regardless of the dialect.
  • I think this problem happens only for the following dialect(s):
  • I don’t know, I was using ‘mysql’, with connector library version XXX and database version mysql Ver 15.1 Distrib 10.1.41-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 (how am I supposed to find the connector version ?)

Would you be willing to resolve this issue by submitting a Pull Request?

  • Yes, I have the time and I know how to start.
  • Yes, I have the time but I don’t know how to start, I would need guidance.
  • No, I don’t have the time, although I believe I could do it if I had the time…
  • No, I don’t have the time and I wouldn’t even know how to start.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
pwnorbitalscommented, Oct 15, 2019

Reduced the pool minimum number of connections to zero. Trying to reliably fix and test that for a production environment would be a nightmare and I don’t mind a tiny bit of latency when reconnecting since database is local

1reaction
pwnorbitalscommented, Oct 14, 2019

This was indeed a problem with Sequelize. The connection pool I used had a minimum of five connections, and those connections would get into an invalid state after being inactive after some time. Trying to use them before they get evicted from the pool, but after getting into this invalid state, triggers the error. I hope this can help someone in the future

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linux socket send() error EAGAIN - Stack Overflow
I am using non-blocking sockets, and the socket is closed then re-opened between connect attempts.
Read more >
WHY DOES SEND() RETURN EAGAIN / EWOULDBLOCK?
If your socket is in 'non blocking' mode then the 'send()' will fail with 'EAGAIN' or 'EWOULDBLOCK' (often the same error number)
Read more >
Why does recvfrom() call return EAGAIN error?
When recvfrom is used on a non-blocking socket, it returns EAGAIN error if there are no pending data to be read.
Read more >
bt_conn_le_create will return an error -11 (EAGAIN)
I am trying to create several client connections for different servers. The code is incomplete at the moment as the focus is on...
Read more >
Added information about what can cause EAGAIN and ... - kernel
I have found that these errors can also occur when a receive timeout has been set on the socket and the timeout expires...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found