• Resolved dijol

    (@dijol)


    Hi All!

    This issue is BLOWING MY BRAINS OUT.

    Ok, so we have a wordpress multisite that runs 3 woocommerce stores, and utilises ONE HUNDRED AND EIGHTEEN plugins!

    This is not our doing, the customer loves to install them and enhance his order processing screens etc. /joys

    ANYWAY, plugin aids aside – we have auto updates disabled on everything yet twice a day, at exactly 10:45AM and 10:45PM the site creates a .maintenance file and then it sits there for an hour, and then removes it.

    I CANNOT WORK OUT WHAT IS HAPPENING AND WHAT IS CAUSING THIS FILE TO BE CREATED

    I have installed activity log plugins to log cron events and stuff, and the only thing near that time is the mediacloud heartbeat thing, but that happens every minute so it just cant be that.

    We CANNOT disable all the plugins and debug that way as some are vital to the site working (the wishlist plugin in header, for example, if we disable it the site doesn’t load)

    The site gives us headaches, its an ABSOLTLE monster and anything we try is so long winded and bum twitchy its unreal…

    Anyone got ANY ideas on what could be causing this, or what to try?

    I installed a new cron plugin that pushes ALL cron stuff to the server and doesn’t use WP cron. It still seems to take the site down.

    Thats how things are at the moment, I have Advanced Cron Manger installed, and the “Server Scheduler” option ticked on all sites, and the lines added to server cron manually.

    I set to do them at random times tho, one runs every 45 mins, one runs ever 28 mins and one runs every 53 mins…

    The server still goes down at the same time each day AM and PM via the .maintenance file being placed in the root.

    :'(

    Any help/pointers/thoughts would be appreciated…. Its honestly making no sense at all

Viewing 12 replies - 1 through 12 (of 12 total)
  • This sounds frustrating. I have no idea what could be causing this. I am curious to see if anyone has a possible solution.

    Dude, so much to unpack!
    You’re being too kind imo – I’d have dumped this client already. Lol

    > We CANNOT disable all the plugins and debug that way as some are vital to the site working

    Wait – are you telling me that you are actively working on the production site? you have a client with 118 plugins installed and you don’t have a development site setup? Brave.

    imo, this is not a WordPress issue, some thoughts in random order:

    – Have you checked the php logs?
    – Have you checked the apache logs, increase the LogLevel:
    https://httpd.apache.org/docs/2.4/mod/core.html#loglevel
    – Can you run a top | ps -ef during this time?
    https://www.linuxandubuntu.com/home/using-ps-and-top-to-monitor-linux-processes
    – When you open the .maintenance file, is there any reference or variable in there re: time?
    – What is the output from crontab -l ?
    – You could run your own script over cron at 10:45am/pm that simply deletes the .maintenance file (personally, this is what I would do)
    – I would also ask my host to download the syslog to see the activity, syslog is where the cron events will be logged

    Thread Starter dijol

    (@dijol)

    Thanks man.

    1) We use a staging site ON the multisite to test stuff, we cant do a proper staging site as his DB is HUGE so if we do a load of stuff locally or whatever, pushing anything into his live DB or whatever is not possible.

    2) Hes a personal friend, else we would have dumped him. I tried SO HARD to persuade him to not use WP for this. We love WP, but not for large ecom stores with 1000’s of products with 1000’s of variations etc etc.

    3) there is NOTHING in the logs, this is what makes it SO GODDAM frustrating. We are the host, and we have scoured EVERYTHING. I will increase the loglevel – thanks!

    In fact, im gonan increase the loglevel as we literally have gaps of like 30 mins whilst its “down” (when the maintenance file has been place) so we need logs really dont we.

    Thanks for your help so far.

    Pray for me lol

    Thread Starter dijol

    (@dijol)

    Sorry, assumed you were a bloke. My bad!

    Thank you for your help so far, you’ve been great.

    Thread Starter dijol

    (@dijol)

    Cron output;

    */45 * * * * wget -qO- https://clientsite1.url/wp-cron.php &> /dev/null
    */28 * * * * wget -qO- https://clientsite2.url/wp-cron.php &> /dev/null
    */53 * * * * wget -qO- https://clientsite3.url/wp-cron.php &> /dev/null

    Thread Starter dijol

    (@dijol)

    This is the slice of time in which this happens, and the output form syslog

    We use a plugin to restart apache if its failed, we also have hetrixtools agent running via cron – this bit below from 10:49:45 doesn’t SEEM to appear elsewhere in the logs…

    Jan 13 10:45:00 wordpress CRON[26774]: (root) CMD (/var/restart_apache.sh)
    Jan 13 10:45:00 wordpress CRON[26775]: (root) CMD (wget -qO- https://clientsite1.co.uk/wp-cron.php &> /dev/null)
    Jan 13 10:45:00 wordpress  CRON[26773]: (root) CMD (bash /etc/hetrixtools/hetrixtools_agent.sh >> /etc/hetrixtools/hetrixtools_cron.log 2>&1)
    Jan 13 10:46:01 wordpress  CRON[29848]: (root) CMD (/var/restart_apache.sh)
    Jan 13 10:46:01 wordpress  CRON[29849]: (root) CMD (bash /etc/hetrixtools/hetrixtools_agent.sh >> /etc/hetrixtools/hetrixtools_cron.log 2>&1)
    Jan 13 10:47:01 wordpress  CRON[901]: (root) CMD (/var/restart_apache.sh)
    Jan 13 10:47:01 wordpress CRON[902]: (root) CMD (bash /etc/hetrixtools/hetrixtools_agent.sh >> /etc/hetrixtools/hetrixtools_cron.log 2>&1)
    Jan 13 10:48:01 wordpress CRON[4144]: (root) CMD (/var/restart_apache.sh)
    Jan 13 10:48:01 wordpress CRON[4146]: (root) CMD (bash /etc/hetrixtools/hetrixtools_agent.sh >> /etc/hetrixtools/hetrixtools_cron.log 2>&1)
    Jan 13 10:49:01 wordpress CRON[7156]: (root) CMD (/var/restart_apache.sh)
    Jan 13 10:49:01 wordpress CRON[7157]: (root) CMD (bash /etc/hetrixtools/hetrixtools_agent.sh >> /etc/hetrixtools/hetrixtools_cron.log 2>&1)
    Jan 13 10:49:45 wordpress systemd[1]: Created slice User Slice of root.
    Jan 13 10:49:45 wordpress systemd[1]: Starting User Manager for UID 0...
    Jan 13 10:49:45 wordpress systemd[1]: Started Session 210925 of user root.
    Jan 13 10:49:45 wordpress systemd[9700]: Reached target Paths.
    Jan 13 10:49:45 wordpress systemd[9700]: Reached target Sockets.
    Jan 13 10:49:45 wordpress systemd[9700]: Reached target Timers.
    Jan 13 10:49:45 wordpress systemd[9700]: Reached target Basic System.
    Jan 13 10:49:45 wordpress systemd[9700]: Reached target Default.
    Jan 13 10:49:45 wordpress systemd[9700]: Startup finished in 8ms.
    Jan 13 10:49:45 wordpress systemd[1]: Started User Manager for UID 0.
    Jan 13 10:50:01 wordpress CRON[10736]: (root) CMD (bash /etc/hetrixtools/hetrixtools_agent.sh >> /etc/hetrixtools/hetrixtools_cron.log 2>&1)
    • This reply was modified 2 years, 10 months ago by dijol.

    So can’t you just remove the cron?

    % crontab -l > /tmp/file
    % vi /tmp/file
    — remove the cron(s)
    % crontab /tmp/file

    Thread Starter dijol

    (@dijol)

    We need some form of cron running else some features of the site wont function correctly?

    Ive used wordpress for years but not had cron related issues before so im figuring this out as I go – apologies for my noob-ness

    The symptoms of the issue suggest that something scheduled (or things schedled) are running at those times and overhwelming the server, or causing a loop or something that it gets stuck in.

    My issue, is all auto updates are disabled and nothing in the server cron tallys up with the times the sites are going down.

    Urghhh

    imo, do this and move on –>
    – You could run your own script over cron at 10:45am/pm that simply deletes the .maintenance file (personally, this is what I would do)

    #!bin/sh
    find /var/xxx/htdocs/.maintanence -type f -mtime +7 -exec rm {} +

    Save it to a file, and add it to the cron and run it at 10:46am/pm.
    Problem solved – but I understand if you would prefer to get to the root of the problem!

    Thread Starter dijol

    (@dijol)

    Im just gonna do this – thank you so much.

    I have a life to live, I cant spend the rest of it trying to debug this haha.

    Exactly.
    You already have a massive mess in front of you just with the implelemntation, and I’m sure bleeds all over the place and is overrun with bandaids. At this point, what’s one more bandaid?

    Thread Starter dijol

    (@dijol)

    Graphic, but correct lol.

    All seems OK now. Thanks for your help. I have to admit I didnt think of this kind of solutions I was just focused on the core issue, but like you say – whats another bandaid??? lol

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Maintenance Mode Death – Twice a Day’ is closed to new replies.