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.

TimeoutError: ResourceRequest timed out at ResourceRequest._fireTimeout

See original GitHub issue

What are you doing?

Trying to run basic CRUD operations

{
    "username": "localhost@arun",
    "password": "",
    "database": "test",
    "host": "localhost",
    "dialect": "mysql",
    "pool": {
      "max": 5,
      "min": 0
    }
  }

What do you expect to happen?

Run the code without any errors.

What is actually happening?

Server starts normally. After a few calls to the APIs, it stops the server and displays the following issue:

{ TimeoutError: ResourceRequest timed out at ResourceRequest._fireTimeout (C:\Users\arun-awnics\Documents\workspace\node-samples\mm-node\node_modules\generic-pool\lib\ResourceRequest.js:58:17) at Timeout.bound (C:\Users\arun-awnics\Documents\workspace\node-samples\mm-node\node_modules\generic-pool\lib\ResourceRequest.js:8:15) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5) name: ‘TimeoutError’ }

Dialect: mysql Dialect version: 2.15.0 Database version: 10.1.24-MariaDB Sequelize version: 4.22.5 Tested with latest release: No

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
ghostcommented, Feb 13, 2018

Hi @sushantdhiman

I spoke with @mickhansen yesterday in slack and resolved this issue. I was using transactions in my GET methods but didn’t manage them properly. Hence the pool was getting filled with transactions and causing the issue.

return sequelize.transaction().then(function(t) {
            userModel.user.findAll({ transaction: t }).then((user) => {
                callback(user);
            });
        });

Now I changed my code to look like this(without transactions):

userModel.user.findAll().then((user) => {
            callback(user);
        });

It works fine now. You may close the issue. Thank you for your time.

1reaction
Tokyocsdcommented, Oct 24, 2019

{ SequelizeConnectionAcquireTimeoutError: Operation timeout at pool.acquire.catch.error (/www/wwwroot/doumi/node_modules/sequelize/lib/dialects/abstract/connection-manager.js:282:52) name: ‘SequelizeConnectionAcquireTimeoutError’, parent: Error: Operation timeout at Timeout._timeout.setTimeout (/www/wwwroot/doumi/node_modules/sequelize-pool/lib/Deferred.js:19:19) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10), original: Error: Operation timeout at Timeout._timeout.setTimeout (/www/wwwroot/doumi/node_modules/sequelize-pool/lib/Deferred.js:19:19) at ontimeout (timers.js:436:11) at tryOnTimeout (timers.js:300:5) at listOnTimeout (timers.js:263:5) at Timer.processTimers (timers.js:223:10) } There are occasional errors, and the only solution is to restart

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sequelize: TimeoutError: ResourceRequest timed out
My Express app running on node 6.11 with Sequelize 4.5.0 will sometimes throw TimeoutError: ResourceRequest timed out , on operations that ...
Read more >
TimeoutError: ResourceRequest timed out #7884 - GitHub
I cannot reproduce the error. Obviously there was a timeout in connecting to the DB server, it doesn't look like a bug in...
Read more >
Debugging ResourceRequest Timed out error in Sequelize
While working on a project that involves building a small analytics platform using PostgreSQL, I ran into the ResourceRequest timed out ...
Read more >
MySQL : Sequelize: TimeoutError: ResourceRequest timed out
MySQL : Sequelize: TimeoutError : ResourceRequest timed out [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] MySQL ...
Read more >
TimeoutError with getIdsFromRequest(req) function - Help me!
Now that our user database is growing, we are getting more and more timeout errors with the getIdsFromRequest function call.
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