Announcement

Collapse
No announcement yet.

cron job to restart MySQL?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • cron job to restart MySQL?

    First off, I know absolutely nothing about MySQL, writing cron jobs, and almost nothing about PHP, so please offer any advice as if you were talking to a very young child, as I need some hand holding here.

    My forums keep going down, like twice a day now, but they come back something like 10 minutes later on their own. I don't want them to go down at all.

    I called up tech support, and they told me to email support, which I did. I was told that I had to write a cron script, and that they would install it for me. The script should restart MySQL every 15 minutes. The tech support guys suggested this would solve my problem, but would not write the script for me. They did say however that they would install the script for me once it was written.

    So, where do I start here? I have no idea how to write a cron job, I don't even know where to start.

    Thanks in advance.

  • #2
    You do NOT want to restart MySQL every 15 minutes because if it stops while the database is being written to you will end up with a corrupted db.

    It sounds like MySQL is already restarting on its own. The problem you need to solve is the issue of it going down in the first place. In that respect your web host has let you down. I'd suggest heading over to the Server Configuration forum and posting your server specs and the contents of your my.cnf file.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      how do i obtain the server stats?

      Comment


      • #4
        I'm assuming this is your dedicated server, right? You can get the stats from WebHost Manager, or some other equivalent tool provided by your host to manage your server.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          no, i guess they told me it was a shared server. they suggested i go with a dedicated solution, but those started at something like $500 a month...crazy

          Comment


          • #6
            Well then your host's technical support team is even more clueless than I thought. Did they really tell you that a user on a shared server could 'restart' MySQL on a set schedule with cron?
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment


            • #7
              yup, they certainly did

              Comment


              • #8
                Originally posted by XFLBret
                yup, they certainly did
                My advice - find yourself a host that knows what they are doing. If this is happening twice a day as you say, I'll bet they are restarting MySQL on a set schedule themselves. This is only something hosts do when they don't know how to properly configure a server. The fact that they told *you* you could restart MySQL means that they are either lying to you or don't know what they are talking about. Either way it's not good news for you. Good luck!
                Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                Change CKEditor Colors to Match Style (for 4.1.4 and above)

                Steve Machol Photography


                Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                Comment


                • #9
                  Originally posted by smachol
                  Good luck!
                  Thanks. Sounds like I'm gonna need it

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X