Code Monkey home page Code Monkey logo

laravel-queue-monitor's People

Contributors

gilbitron avatar judgej avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ardohr-ltd

laravel-queue-monitor's Issues

Improve docs

List the changes made over the original fork. Includes the additional data that is captured (which could possibly be something we can turn off by configuration).

Database connections lost after any time waiting

This is a problem I've not seen on MySQL but am seeing on Azure SQL Server.

If no jobs are processed for some time - in the order of a few hours - then the database connection seems to "go bad". This results in a failure to dispatch any further jobs from the queue, with an error:

[2018-04-17 23:02:17] production.ERROR: SQLSTATE[08S02]: [Microsoft][ODBC Driver 13 for SQL Server]SMux Provider: Physical connection is not usable [xFFFFFFFF]. (SQL: select top 1 * from [queue_monitor] where [job_id] = 66084abc-7654-4b2c-82fa-a66e655eeb6d order by [started_at] desc, [id] desc) {"exception":"[object] (Illuminate\Database\QueryException(code: 08S02): SQLSTATE[08S02]: [Microsoft][ODBC Driver 13 for SQL Server]SMux Provider: Physical connection is not usable [xFFFFFFFF]. (SQL: select top 1 * from [queue_monitor] where [job_id] = 66084abc-7654-4b2c-82fa-a66e655eeb6d order by [started_at] desc, [id] desc) at .../vendor/laravel/framework/src/Illuminate/Database/Connection.php:664, PDOException(code: 08S02): SQLSTATE[08S02]: [Microsoft][ODBC Driver 13 for SQL Server]SMux Provider: Physical connection is not usable [xFFFFFFFF]. at .../vendor/laravel/framework/src/Illuminate/Database/Connection.php:326)

I guess the events are registered in the long-running job worker process, and it is that process that attempts to log the job details, and the database connection does not stay open for long waiting for that to happen.

The exception also does not put the job into the failed jobs queue, so it is effectively lost. This means it is absolutely essential that no event handlers registered against the job dispatcher must throw ANY exceptions. It is very important to catch any kind of error, perhaps log it, but then return to the caller.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.