-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Triggers are getting blocked permanently #145
Comments
I was able to reproduce the issue in the debugger. If Probably Best Regards, |
Is there anyone who can verify and release this fix? |
I would also like to see this bug addressed. Any update on when the fix will get merged and built? |
Actual bug for me too. We are going to change quartz. |
👍 looks like there's a PR to fixit |
We're having this same issue. Any idea when this will get approved and get a patch out? It seems pretty significant. |
As we can see that this has been around for a while now and this bug is fixed in dot net libraries of quartz. I t will be helpful for us to know on when this will be fixed, as we are affected by this. (This pull request has been raised to address that on 22 May 2017 #146) |
I am facing the same issue with 2.2.1, Is there a fix provided by Quartz for this ? |
@MSudheer87 we reduced frequency of this problem when we created sepatared db. |
@AntonSemenovKazan Thanks for your reply. Let me give you few more details about my issue,
based on above facts, Do you suspect anything else other than separating out the DB Schema ? Please provide your suggestions, Thank you. |
@MSudheer87 So we decided to move Quartz tables to their own separate scheme. For example, you also can take sources and extend logging. But all my team think that Quartz is a little bit strange and we quite often have some troubles. We have written monitoring system to control Quartz behavour. Unfortunately I cannot say anything about Spring Batch. |
Going by @shelmling fix, a work-around for
This should unblock you as of now 👍 |
Thank you @shelmling for the PR! It's now merged! |
* relates to quartz-scheduler/quartz#146 , quartz-scheduler/quartz#145 * relates to #741 #800
I cannot see this issue 145 to be fixed in any release at https://github.com/quartz-scheduler/quartz/releases . |
I should say that eventually we changed Quartz to Hangfire and now we live happily. We found out that Quartz stuck when HDD had high I/O operations. So then we compared Hangfire+MS SQL with high I/O operations and it worked without problems. |
@carstenartur It is fixed in 2.3.1+ as part of pull request #146 see commit: 3f65b28 |
For those who are still seeing this issue and if you implemented the |
After 6 hours trying to find a solution I bumped into your answer and it was exactly what was happening in my code. |
Most of these blocked triggers change the trigger state from BLOCKED to WAITING automatically since added the JobListner and upgrade quartz from 2.3.0 to the latest version 2.3.2. |
@AntonSemenovKazan and @MSudheer87 our team was noticing issues similar to yours. The quartz queries on SQL Server would slow down significantly to the point of timing out when the database was under heavy load and waits started to increase (either CPU, Memory, or Disk). One of the things we noticed was the query plans for quartz queries were very inefficient. When we deep dived we found something like the following query was being executed on the DB: The issue with the above is that parameters We found we were using the SQL Server JDBC driver, and it has a setting for setSendStringParametersAsUnicode which defaults to on. This causes all string parameters to be sent as nvarchar, even if the column is varchar. The quartz tables don't have any nvarchar columns, and based on Microsofts own documentation:
We only recently found this out and deployed it to our production environment. I don't know if it will fully fix the quartz issues we have seen but we haven't had any issues since we made this switch last month, so I thought I would post it out incase it helps anyone else. The fix was simply setting the |
* applying commit quartznet/quartznet@05fd35c * related to quartz-scheduler/quartz#146 , quartz-scheduler/quartz#145 , #741, #800
Our team has deployed latest version 2.3.2 quartz JAR last Friday in prod server. But we are still immediately experiencing BLOCKED triggers in the qrtz_triggers table for our email notification after catalina restart. Is there any followup/advice for this behavior? Would enabling TRACE logging on "org.quartz" package help? We have a clustered option set in the quartz.properties and the quartz tables are in the same db schema as our app tables. Has anyone enabled JMX remote access to mbeans as a potential workaround to reset trigger state to WAITING and then immediately firing trigger? https://dzone.com/articles/how-manage-quartz-remotely |
I encountered a similar issue in our team's new project. We have two app servers, but we only deployed the war file, which includes the Quartz job, on app A. In the related cluster configuration on the Quartz job XML, we set it to false. Initially, the scheduled jobs functioned properly, but at certain times, they would become "blocked" and fail to resume. We observed that only the jobs related to updating the status in the database would rerun and return to normal functioning. However, we couldn't find any relevant error logs on the app server. Does anyone have any insights into this issue? On the other hand, we previously implemented the same configuration (two app servers, war file hosted only on app A) in another project without encountering similar issues. It's worth noting that the previous project used MSSQL, while the new project uses MYSQL. |
Dear Quartz Team,
We are using Quartz 2.2.1 in clustered-mode with JDBC job store to schedule jobs marked as
@DisallowConcurrentExecution
.We have observed that occasionally triggers are getting stuck in trigger state
BLOCKED
without ever recovering automatically. Looking into the job store DB tables, the pattern is always the same:The
TRIGGER_STATE
on<PREFIX>_TRIGGERS
is in stateBLOCKED
There is no corresponding record in
<PREFIX>_FIRED_TRIGGERS
Obviously
org.quartz.impl.jdbcjobstore.JobStoreSupport.clusterRecover(Connection, List<SchedulerStateRecord>)
will not recover such triggers, so the only way to get out of this inconsistent state is to manually set theTRIGGER_STATE
back toWAITING
.It is not yet clear under which circumstances this error occurs. However, our log files indicate that jobs getting stuck coincides with temporary database problems.
Below you can find an example of a
NullPointerException
inorg.quartz.impl.jdbcjobstore.JobStoreSupport.triggersFired(List<OperableTrigger>)
. The exception itself was caused somewhere in the JDBC driver (Sybase jConnect) when trying to invokerollback()
on a JDBC connection. The log entry’s timestamp correlates exactly with the time the trigger got stuck.Please let me know if you need additional details.
Thanks for your support,
Sebastian
The text was updated successfully, but these errors were encountered: