Results 1 to 7 of 7

Thread: a stop job is running for MySQL server

  1. #1
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    72

    Default a stop job is running for MySQL server

    The following error stalls shutdown after the machine goes to sleep mode

    Code:
    a stop job is running for MySQL server
    Maybe the time daemon changes and MariaDB cannot restart with the correct time.

    My system is always updated.

  2. #2
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,748

    Default Re: a stop job is running for MySQL server

    Shutdown needs to wait until all processes finish all they need to do. mySQL must have some job running or needs to commit some cache

  3. #3
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    72

    Default Re: a stop job is running for MySQL server

    Quote Originally Posted by gogalthorp View Post
    Shutdown needs to wait until all processes finish all they need to do. mySQL must have some job running or needs to commit some cache
    That's not the problem.
    When I don't put my pc in sleep mode everything is going fine, but when I use sleep mode the problem arose.

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,299
    Blog Entries
    2

    Default Re: a stop job is running for MySQL server

    Sounds like the machine is going into "sleep mode" while the MySQL stop process hasn't completed.

    This is probably happening because your sleep command is before, or causing the MySQL stop command.
    You should be able to address this manually by run the following at least 2 minutes before you intend to put your machine is shutdown or sleep mode
    Code:
    systemctl stop mysqld
    Something like the above should be implemented to happen automatically for a "sleep" command but
    - system shutdown and sleep commands are often executed by a Desktop and not using systemd commands, so it's anyone's guess what the Desktop developers decide to do
    - Most people won't want to wait up to 2 minutes for the mysql daemon to shut down properly. If you as a most knowledgeable User knows how to avoid all database activity before shutting down, the above command to stop the mysql daemon will take only a few seconds to complete.
    - It's a reason why relatively few User apps use database engines like mariadb/mysql.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,395
    Blog Entries
    1

    Default Re: a stop job is running for MySQL server

    Quote Originally Posted by tsu2 View Post
    Sounds like the machine is going into "sleep mode" while the MySQL stop process hasn't completed.

    This is probably happening because your sleep command is before, or causing the MySQL stop command.
    You should be able to address this manually by run the following at least 2 minutes before you intend to put your machine is shutdown or sleep mode
    Code:
    systemctl stop mysqld
    If MariaDB is in use the service is 'mariadb.service', or its alias 'mysql.service' (as defined in /usr/lib/systemd/system/mariadb.service).
    openSUSE Leap 15.0; KDE Plasma 5

  6. #6
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,299
    Blog Entries
    2

    Default Re: a stop job is running for MySQL server

    Quote Originally Posted by deano_ferrari View Post
    If MariaDB is in use the service is 'mariadb.service', or its alias 'mysql.service' (as defined in /usr/lib/systemd/system/mariadb.service).
    Yup,
    Careless me, relying on a faulty memory.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  7. #7
    Join Date
    Jul 2008
    Location
    Greece
    Posts
    72

    Default Re: a stop job is running for MySQL server

    Thanks

    I knew that and I did stopped mysql before going to sleep (mode) but I thought that it was some kind of fault that would be fixed.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •