schmittjoh / JMSJobQueueBundle

Run and Schedule Symfony Console Commands as Background Jobs
http://jmsyst.com/bundles/JMSJobQueueBundle
334 stars 254 forks source link

MYSQL error when using high ammount of memory #207

Open phimax opened 6 years ago

phimax commented 6 years ago

When executing one of my commands it gives me the following error:

[Symfony\Component\Debug\Exception\FlattenException] An exception occurred while executing 'UPDATE jms_jobs SET stackTrace = ?, memoryUsage = ?, memoryUsageReal = ? WHERE id = ?' with params ["N;", 4393229440, 4528078848, "27"]: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'memoryUsage' at row 1

This happens because my commands needs a lot of memory space to run.

The memoryUsage and memoryUsageReal columns are defined as INT which limits the value of this columns to 2147483647.

A quick but not permanent solution is to change that column type into BIGINT, but the doctrine mapping detect's it as the database schema is not in sync with the mapping file.

It would be great to override the Job Entity to be able to change this on my own, but I can't do it.

mcorteel-harel commented 4 years ago

I have the same problem. The result is a failed job, even though the job actually succeeded.