Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Magalliu's avatar

production.ERROR: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'attempts' at row 1

Hi guys, since 1 week I'm having this issue on production: production.ERROR: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'attempts' at row 1 (SQL: updatejobssetreserved_at= 1655975272,attempts= 256 whereid= 742) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 22003): SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'attempts' at row 1 (SQL: updatejobssetreserved_at= 1655975272,attempts= 256 whereid= 742) at /var/www/html/b2b2c-api/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712)

I don't know if I have to change the column 'attempts' type because right now it's tiny int or do something else. What do you suggests about. Thanks!

0 likes
5 replies
lat4732's avatar
lat4732
Best Answer
Level 12

tinyint's range is from 0 to 255. That's why you are getting an error when trying to update it with 1264. I suggest you to change the column type to smallint (from -32,768 to 32,767) or int.

visualization1

2 likes
Tray2's avatar

Yes, TinyInt can only holb values up to 255 if it's unsigned. I would at least change it to int.

1 like
Magalliu's avatar

Thanks guys I set it to bigint and now it's working fine

musheabdulhakim's avatar

Sometimes clearing the jobs and queues is the trick.

php artisan queue:clear
php artisan optimize:clear

Please or to participate in this conversation.