Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Morrigan Posted June 29, 2020 Posted June 29, 2020 So I have a dedicated server, sure there are other people that I host but I've been trying to figure out why my server always feels so bogged down and it felt like it was slowly getting worse. Well I sat on my server's processes page to find out that tasks.php was taking up significant amounts of my ram and processor. And not bad right? But it wasn't just 1 tasks.php that was running for my forum. Since it runs every minute I have about 20 of these processes running for my site alone taking up 70+% processing time. What I did to see if this was a problem is I terminated all processes started by my sites account. Low and behold my site went from loading forever to a more snappy and immediate download. Currently I've deleted the cron tasks and went back to the default method of running it with my traffic (I have enough traffic it SHOULD be fine). What I'm looking to find out if anyone else has this issue and how they resolve it. The only thing I could think of was to maybe change the cron from running every minute to running every 10-15 minutes. Note, that I run multiple IPS instances off of this server and none of my smaller/low traffic sites have this problem. Any insight? Advice? sobrenome 1
Lucas James Posted June 30, 2020 Posted June 30, 2020 (edited) Please show the result of following: crontab -l and what does the cron log show: grep CRON /var/log/syslog BTW, I run multiple IPS forums and WP sites with lot of crons simultaneously (slow, average and high traffic) on different servers but never encountered such issue. Edited June 30, 2020 by Lucas James sobrenome 1
bfarber Posted June 30, 2020 Posted June 30, 2020 Do you happen to have a bunch of background tasks queued on your dashboard presently? If you just upgraded to 4.5, you may have many background tasks queued to run, which would explain why cron tasks are taking up above average resources. sobrenome 1
Morrigan Posted July 1, 2020 Author Posted July 1, 2020 No. @bfarber this slowness has existed since 4.4 but it got worse in 4.5. You’ve been in my ACP but I didn’t have any background tasks running. They are regularly cleared out. But even then having tasks.php fire and not complete is detrimental to fire it again. Now you have 2 processes doing the same thing. It just quickly gets exponentially worse. I don’t even have a super massive community. I’d say 100 average online users (guests and members) on average. To be clear. Turning it off made my site load in seconds instead of 30+ visible seconds. sobrenome 1
bfarber Posted July 1, 2020 Posted July 1, 2020 It's theoretically possible you've hit a PHP bug where the script is not exiting as it should. It's really hard to say from here. And it's worth mentioning that two tasks running at the same time is not in and of itself an issue. The first execution could be sending notifications and the second could be running a separate (quicker) task manager task. It's ok if they stack a little, particularly when you have background tasks running.
Morrigan Posted July 2, 2020 Author Posted July 2, 2020 Just now, bfarber It's theoretically possible you've hit a PHP bug where the script is not exiting as it should. It's really hard to say from here. And it's worth mentioning that two tasks running at the same time is not in and of itself an issue. The first execution could be sending notifications and the second could be running a separate (quicker) task manager task. It's ok if they stack a little, particularly when you have background tasks running. I’d say you’re right. I’d even give it to 3-4 tasks but twenty is excessive.
bfarber Posted July 6, 2020 Posted July 6, 2020 Yes, I would think if you have 20 running that they're not stopping for some reason and they obviously should. It's really hard for me to say much more at this time from here unfortunately.
Recommended Posts