fitim wrote a reply+100 XP
4mos ago
fitim wrote a reply+100 XP
4mos ago
fitim wrote a reply+100 XP
4mos ago
The production system gets ~1000 requests per minute for a small operation. For example: get user from DB who is making the request compare the DB data with input and perform an api request in another service is data does not match and store the update in database.
All production commands are performing well nothing out of ordinary.
But i have removed everything from dev server so there is nothing happening really. I just call the schedule:run and there is no commands to execute. It still spikes. Im thinking to remove the schedule:run from cron and do it as endpoint for runing my command. But this will be overkill and i still need to understand why these spikes ocur when there is nothing there.
fitim wrote a reply+100 XP
4mos ago
@snapey i have a chart of the issue in production. The app is running on a 6 code machine. so 30/6 is 5 threads waiting. Which makes the impact pretty severe in production. Increasing the lottery chances brought the values slightly lower but nothing of great improvement.
One question to you. There cleanup functions run only when schedule:run is configured? Because when i remove the schedule:run from cron the issue disappears.
fitim liked a comment+100 XP
4mos ago
fitim wrote a reply+100 XP
4mos ago
This is a chart from production. https://postimg.cc/ZWyhym6n i have a 6 core machine which is 30/6 which leaves 5 processes competing a the same time.
fitim wrote a reply+100 XP
4mos ago
fitim wrote a reply+100 XP
4mos ago
fitim wrote a reply+100 XP
4mos ago
fitim started a new conversation+100 XP
4mos ago
I’m running into a strange performance issue with the Laravel scheduler and I’m trying to understand what’s going on.
Framework: Laravel 12 PHP: 8.2 Web server: Apache on Linux
"require": { "php": "^8.2", "ext-curl": "", "ext-openssl": "", "firebase/php-jwt": "^6.11", "laravel/framework": "^12", "laravel/telescope": "^5.5", "laravel/tinker": "^2.10", "stancl/tenancy": "^3.9.1" }, There is a fresh laravel install: The scheduler is triggered in the system’s cron like this:
-
-
-
-
- php /path/to/artisan schedule:run >> /dev/null 2>&1
-
-
-
There are no scheduled tasks When I check the scheduler, I get this: $ php artisan schedule:list INFO No scheduled tasks have been defined.
What I actually see: CPU is mostly fine. About once per hour, CPU usage goes high for a short period (a few minutes). This pattern only exists while schedule:run is enabled.
I also can provide more data by request. I have CPU chart and more details about the instalation