Support the ongoing development of Laravel.io →
posted 1 week ago
Last updated 6 days ago.
0

I may be on to something...

The IS a difference in the two blocks of code - the QUERY.

Between the two instances - the query is exactly the same except for a single

WHERE created_on >= '2024-01-01' -vs- WHERE created_on >= '2006-01-01'

The first one works - returns 6 results The secnd one does NOT work - returns just over 4,000 results (verified by manual query)

Got a feeling this is an issue with memory or something with MySQL config.

Very frustrating since no error output is being provided anywhere

0

Traced this down to the number of results returned.

As soon as the result set will be greater than 4,000, the 500 http is returned.

As soon as I tweak the WHERE clause to limit under 4000, everything works.

max_packet_size or something? New server is set up with larger default than the old one AFAIKT

0

Turns out the php max memory was too low.

And furthermore, I did not realize Rocky 9 (by default) uses php-fpm. So re-starting apache after changes to php.ini were not applying those changes (to max-memory setting, for example). And since the process was dying at the php-fpm layer, I did not think to look at /var/log/php-fpm logfile (which does mention the memory exhaustion).

Finally got it squared away.

For future reference - for those who are chasing a script that dies out on an HTTP/500 without any aparent error messages in the normal logs - check your php-fpm logs! Especially since this seems to be the default setup on most (all?) RHEL-based distros now days.

-Dean

0
Solution selected by @driesvints

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.