ISE 500 due to overloading / time-out

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • windandwaves

    ISE 500 due to overloading / time-out

    Hi Folk

    I have a long script that sends a bunch of emails (between 5 and 20). At
    the end of the script, it creates a Internal Server Error 500 - sometimes
    only. The more emails I send , the more likely it seems that I get the
    error. The whole script runs though - it seems (error occurs somewhere
    near or at the end).

    I imagine it either to be server overload OR a time-out (it takes about 30
    seconds for the script to run (which I think relates the email send part...)

    Any hints? I am a little lost.


  • Dave

    #2
    Re: ISE 500 due to overloading / time-out

    windandwaves (winandwaves@co ldmail.com) decided we needed to hear...[color=blue]
    > Hi Folk
    >
    > I have a long script that sends a bunch of emails (between 5 and 20). At
    > the end of the script, it creates a Internal Server Error 500 - sometimes
    > only. The more emails I send , the more likely it seems that I get the
    > error. The whole script runs though - it seems (error occurs somewhere
    > near or at the end).
    >
    > I imagine it either to be server overload OR a time-out (it takes about 30
    > seconds for the script to run (which I think relates the email send part...)
    >
    > Any hints? I am a little lost.[/color]

    Sounds likely that this is a script timeout. Your server error log
    would confirm that for you. Even so you might find this page
    useful - http://www.php.net/set_time_limit

    --
    Dave <dave@REMOVEbun dook.com>
    (Remove REMOVE for email address)

    Comment

    • windandwaves

      #3
      Re: ISE 500 due to overloading / time-out

      Dave wrote:[color=blue]
      > windandwaves (winandwaves@co ldmail.com) decided we needed to hear...[color=green]
      >> Hi Folk
      >>
      >> I have a long script that sends a bunch of emails (between 5 and
      >> 20). At the end of the script, it creates a Internal Server Error
      >> 500 - sometimes only. The more emails I send , the more likely it
      >> seems that I get the error. The whole script runs though - it
      >> seems (error occurs somewhere near or at the end).
      >>
      >> I imagine it either to be server overload OR a time-out (it takes
      >> about 30 seconds for the script to run (which I think relates the
      >> email send part...)
      >>
      >> Any hints? I am a little lost.[/color]
      >
      > Sounds likely that this is a script timeout. Your server error log
      > would confirm that for you. Even so you might find this page
      > useful - http://www.php.net/set_time_limit[/color]

      Hi Dave,

      Thank you for your answer. I tried it, but it unfortunately it did not
      solve the problem.

      This is what I added to my script:

      ini_set('max_ex ecution_time', 120);
      set_time_limit( 120);

      But still ISE500....

      I even changed the same parameters on the php.ini file, but still no luck.

      What do else can it be, or how can i find out?



      Comment

      • Dave

        #4
        Re: ISE 500 due to overloading / time-out

        windandwaves (winandwaves@co ldmail.com) decided we needed to hear...[color=blue]
        > Dave wrote:[color=green]
        > > windandwaves (winandwaves@co ldmail.com) decided we needed to hear...[color=darkred]
        > >> Hi Folk
        > >>
        > >> I have a long script that sends a bunch of emails (between 5 and
        > >> 20). At the end of the script, it creates a Internal Server Error
        > >> 500 - sometimes only. The more emails I send , the more likely it
        > >> seems that I get the error. The whole script runs though - it
        > >> seems (error occurs somewhere near or at the end).
        > >>
        > >> I imagine it either to be server overload OR a time-out (it takes
        > >> about 30 seconds for the script to run (which I think relates the
        > >> email send part...)
        > >>
        > >> Any hints? I am a little lost.[/color]
        > >
        > > Sounds likely that this is a script timeout. Your server error log
        > > would confirm that for you. Even so you might find this page
        > > useful - http://www.php.net/set_time_limit[/color]
        >
        > Hi Dave,
        >
        > Thank you for your answer. I tried it, but it unfortunately it did not
        > solve the problem.
        >
        > This is what I added to my script:
        >
        > ini_set('max_ex ecution_time', 120);
        > set_time_limit( 120);
        >
        > But still ISE500....
        >
        > I even changed the same parameters on the php.ini file, but still no luck.
        >
        > What do else can it be, or how can i find out?[/color]

        I was betting on timeout since PHP's default is 30 seconds and thats
        the time you mentioned it usually failed at, but if its *not* that
        then I'm afraid I couldn't really guess at anything else.

        In order to find out more you should first look at the server error
        log (for apache on unix the file is usually something like
        /var/log/httpd/error_log). Have you also tried increasing the
        level of error reporting (see http://www.php.net/error-reporting)

        HTH
        --
        Dave <dave@REMOVEbun dook.com>
        (Remove REMOVE for email address)

        Comment

        • windandwaves

          #5
          Re: ISE 500 due to overloading / time-out

          Dave wrote:[color=blue]
          > windandwaves (winandwaves@co ldmail.com) decided we needed to hear...[color=green]
          >> Dave wrote:[color=darkred]
          >>> windandwaves (winandwaves@co ldmail.com) decided we needed to hear...
          >>>> Hi Folk
          >>>>
          >>>> I have a long script that sends a bunch of emails (between 5 and
          >>>> 20). At the end of the script, it creates a Internal Server Error
          >>>> 500 - sometimes only. The more emails I send , the more likely it
          >>>> seems that I get the error. The whole script runs though - it
          >>>> seems (error occurs somewhere near or at the end).
          >>>>
          >>>> I imagine it either to be server overload OR a time-out (it takes
          >>>> about 30 seconds for the script to run (which I think relates the
          >>>> email send part...)
          >>>>
          >>>> Any hints? I am a little lost.
          >>>
          >>> Sounds likely that this is a script timeout. Your server error log
          >>> would confirm that for you. Even so you might find this page
          >>> useful - http://www.php.net/set_time_limit[/color]
          >>
          >> Hi Dave,
          >>
          >> Thank you for your answer. I tried it, but it unfortunately it did
          >> not solve the problem.
          >>
          >> This is what I added to my script:
          >>
          >> ini_set('max_ex ecution_time', 120);
          >> set_time_limit( 120);
          >>
          >> But still ISE500....
          >>
          >> I even changed the same parameters on the php.ini file, but still no
          >> luck.
          >>
          >> What do else can it be, or how can i find out?[/color]
          >
          > I was betting on timeout since PHP's default is 30 seconds and thats
          > the time you mentioned it usually failed at, but if its *not* that
          > then I'm afraid I couldn't really guess at anything else.
          >
          > In order to find out more you should first look at the server error
          > log (for apache on unix the file is usually something like
          > /var/log/httpd/error_log). Have you also tried increasing the
          > level of error reporting (see http://www.php.net/error-reporting)[/color]

          Hi Dave

          Thank you for your great help. Awesome.

          I tried to increase the error reporting - no luck there (yet, may try it
          again - all I am missing is notices at present).

          Will search for the error log (my isp is not very user friendly).

          I have also asked the ISP, but no answer there.

          Cheers

          Nicolaas


          Comment

          • Dave

            #6
            Re: ISE 500 due to overloading / time-out

            windandwaves (winandwaves@co ldmail.com) decided we needed to hear...[color=blue]
            > Hi Dave
            >
            > Thank you for your great help. Awesome.[/color]

            No problem :)[color=blue]
            >
            > I tried to increase the error reporting - no luck there (yet, may try it
            > again - all I am missing is notices at present).
            >
            > Will search for the error log (my isp is not very user friendly).
            >
            > I have also asked the ISP, but no answer there.
            >
            > Cheers
            >
            > Nicolaas[/color]

            Shame your ISP doesn't sound too helpful. Hopefully you can get a
            hold of the error log somehow - an ISE500 will certainly show at
            least one message in there to give you a clue as to whats going
            on.

            If you happened to be using cPanel or something similar there is
            more than likely a view-error-log option on the menu. Failing that
            if you're on some other kind of virtual-server type setup then I
            imagine the error log is split and you would have to locate the
            specific one related to you but names and locations would depend
            on how it was all setup, so I couldn't make a guess in that case.

            --
            Dave <dave@REMOVEbun dook.com>
            (Remove REMOVE for email address)

            Comment

            • windandwaves

              #7
              Re: ISE 500 due to overloading / time-out


              "Dave" <dave@REMOVEbun dook.com> wrote in message
              news:rr96r2-or9.ln1@fawlty. homelinux.net.. .[color=blue]
              > windandwaves (winandwaves@co ldmail.com) decided we needed to hear...[color=green]
              > > Hi Dave
              > >
              > > Thank you for your great help. Awesome.[/color]
              >
              > No problem :)[color=green]
              > >
              > > I tried to increase the error reporting - no luck there (yet, may try it
              > > again - all I am missing is notices at present).
              > >
              > > Will search for the error log (my isp is not very user friendly).
              > >
              > > I have also asked the ISP, but no answer there.
              > >
              > > Cheers
              > >
              > > Nicolaas[/color]
              >
              > Shame your ISP doesn't sound too helpful. Hopefully you can get a
              > hold of the error log somehow - an ISE500 will certainly show at
              > least one message in there to give you a clue as to whats going
              > on.
              >
              > If you happened to be using cPanel or something similar there is
              > more than likely a view-error-log option on the menu. Failing that
              > if you're on some other kind of virtual-server type setup then I
              > imagine the error log is split and you would have to locate the
              > specific one related to you but names and locations would depend
              > on how it was all setup, so I couldn't make a guess in that case.
              >[/color]


              Hi Dave

              They told me to load it on my local machine and try if I got an error there.

              I dont have a local machine and I am wondering if I would get an error there
              anyway (the error occurs only in about 50% of the times that I run the
              script).



              Comment

              • Dave

                #8
                Re: ISE 500 due to overloading / time-out

                windandwaves (windandwaves@c oldmail.com) decided we needed to hear...[color=blue]
                >
                > "Dave" <dave@REMOVEbun dook.com> wrote in message
                > news:rr96r2-or9.ln1@fawlty. homelinux.net.. .[color=green]
                > > windandwaves (winandwaves@co ldmail.com) decided we needed to hear...[color=darkred]
                > > > Hi Dave
                > > >
                > > > Thank you for your great help. Awesome.[/color]
                > >
                > > No problem :)[color=darkred]
                > > >
                > > > I tried to increase the error reporting - no luck there (yet, may try it
                > > > again - all I am missing is notices at present).
                > > >
                > > > Will search for the error log (my isp is not very user friendly).
                > > >
                > > > I have also asked the ISP, but no answer there.
                > > >
                > > > Cheers
                > > >
                > > > Nicolaas[/color]
                > >
                > > Shame your ISP doesn't sound too helpful. Hopefully you can get a
                > > hold of the error log somehow - an ISE500 will certainly show at
                > > least one message in there to give you a clue as to whats going
                > > on.
                > >
                > > If you happened to be using cPanel or something similar there is
                > > more than likely a view-error-log option on the menu. Failing that
                > > if you're on some other kind of virtual-server type setup then I
                > > imagine the error log is split and you would have to locate the
                > > specific one related to you but names and locations would depend
                > > on how it was all setup, so I couldn't make a guess in that case.
                > >[/color]
                >
                >
                > Hi Dave
                >
                > They told me to load it on my local machine and try if I got an error there.
                >
                > I dont have a local machine and I am wondering if I would get an error there
                > anyway (the error occurs only in about 50% of the times that I run the
                > script).
                >[/color]

                By your local machine they mean your own computer where you would need
                to have PHP, Apache and (probably) MySQL installed. I have a seperate
                Linux server here that I use to test my own scripts, but its certainly
                possible to set up the required software on your windows machine (if
                thats what you're using).

                One such package which might help can be found here -
                http://www.easyphp.org/ - but there are quite a few like this so its
                up to you which you want to use.

                Of course if your script runs fine on your local machine then the
                reason could be version related, or any number of other things so
                it still comes down to you needing to see the error log on your
                ISPs server...

                --
                Dave <dave@REMOVEbun dook.com>
                (Remove REMOVE for email address)

                Comment

                • windandwaves

                  #9
                  Re: ISE 500 due to overloading / time-out


                  "Dave" <dave@REMOVEbun dook.com> wrote in message
                  news:jc3cr2-ftd.ln1@fawlty. homelinux.net.. .[color=blue]
                  > windandwaves (windandwaves@c oldmail.com) decided we needed to hear...[color=green]
                  > >
                  > > "Dave" <dave@REMOVEbun dook.com> wrote in message
                  > > news:rr96r2-or9.ln1@fawlty. homelinux.net.. .[color=darkred]
                  > > > windandwaves (winandwaves@co ldmail.com) decided we needed to hear...
                  > > > > Hi Dave
                  > > > >
                  > > > > Thank you for your great help. Awesome.
                  > > >
                  > > > No problem :)
                  > > > >
                  > > > > I tried to increase the error reporting - no luck there (yet, may[/color][/color][/color]
                  try it[color=blue][color=green][color=darkred]
                  > > > > again - all I am missing is notices at present).
                  > > > >
                  > > > > Will search for the error log (my isp is not very user friendly).
                  > > > >
                  > > > > I have also asked the ISP, but no answer there.
                  > > > >
                  > > > > Cheers
                  > > > >
                  > > > > Nicolaas
                  > > >
                  > > > Shame your ISP doesn't sound too helpful. Hopefully you can get a
                  > > > hold of the error log somehow - an ISE500 will certainly show at
                  > > > least one message in there to give you a clue as to whats going
                  > > > on.
                  > > >
                  > > > If you happened to be using cPanel or something similar there is
                  > > > more than likely a view-error-log option on the menu. Failing that
                  > > > if you're on some other kind of virtual-server type setup then I
                  > > > imagine the error log is split and you would have to locate the
                  > > > specific one related to you but names and locations would depend
                  > > > on how it was all setup, so I couldn't make a guess in that case.
                  > > >[/color]
                  > >
                  > >
                  > > Hi Dave
                  > >
                  > > They told me to load it on my local machine and try if I got an error[/color][/color]
                  there.[color=blue][color=green]
                  > >
                  > > I dont have a local machine and I am wondering if I would get an error[/color][/color]
                  there[color=blue][color=green]
                  > > anyway (the error occurs only in about 50% of the times that I run the
                  > > script).
                  > >[/color]
                  >
                  > By your local machine they mean your own computer where you would need
                  > to have PHP, Apache and (probably) MySQL installed. I have a seperate
                  > Linux server here that I use to test my own scripts, but its certainly
                  > possible to set up the required software on your windows machine (if
                  > thats what you're using).
                  >
                  > One such package which might help can be found here -
                  > http://www.easyphp.org/ - but there are quite a few like this so its
                  > up to you which you want to use.
                  >
                  > Of course if your script runs fine on your local machine then the
                  > reason could be version related, or any number of other things so
                  > it still comes down to you needing to see the error log on your
                  > ISPs server...
                  >
                  > --
                  > Dave <dave@REMOVEbun dook.com>
                  > (Remove REMOVE for email address)[/color]

                  That is what I am thinking. I am going to try to install it on a different
                  ISP I think before nuking my own windows machine with PHP...Thank you for
                  all your help

                  Much appreciated.

                  Nicolaas



                  Comment

                  Working...