Using Druid to report errors abandon connection, open stackTrace

< H2 > the cause of the problem < / H2 >

recently wrote a scheduled task using quartz . This scheduled task is mainly to add something like points to members, and to keep a record of points increase, which is executed at 4 o"clock every morning, but sometimes many members" points are not increased. Check the log and find that Druid throws out abandon connection, open stackTrace , and check the error code line. The exception was thrown when the credit increase record was saved, and it took 30 minutes to throw, that is, execution starts at 4 o"clock, and then the exception is thrown at 04:30, resulting in no increase in the user"s points.

< H2 > Table structure < / H2 >
   

at present, I have checked the code many times, but I have not found anything wrong with the code, nor do my colleagues. What is known is why an exception is thrown after 30 minutes, because removeAbandonedTimeout is set for 30 minutes. If you actively acquire the connection and do not release it for 30 minutes, the druid will be released automatically, that is, the code will stop for 30 minutes.

May.14,2022

will the processing logic of scheduled tasks take a long time?

if the time set by removeAbandonedTimeout is exceeded, Druid will recycle this connection remove

  

check the database connection count and check to see if there are other calls that did not release the connection

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3f6a0-4484f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3f6a0-4484f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?