Jump to content

Nathan Johnson

Members
  • Posts

    60
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Nathan Johnson

  1. All depends what the "subject.php" is doing, how many server resources it's using and how often will be called.

     

    With just one visitor on your website reloading a "page" every 5 seconds I'm sure it will be fine.

    With thousands visitors browsing website at the same time and every one of them reloading the "page" every 5 seconds it may be very significant amount of traffic even if "subject.php" is lightweight.

    You know what kind of traffic your website will have and the common sense should help you decide.

     

    Subject.php gets the subject from the database and that's it. The code of subject.php is:

     

    <?php
    $ticket = $_GET['ticket'];
    require_once('connection.php');
    mysql_select_db("my_database") or die(mysql_error());
    $result = mysql_query("SELECT * FROM tickets WHERE ticket='$ticket'");
    $info = mysql_fetch_array($result);
    $subject = $info['subject'];
    
    if($subject != '' && $subject != null) {
    echo $subject;
    }
    else {
    echo "Ticket ID Invalid";
    }
    mysql_close($con);
    ?>

     

    Also, I just changed it to every 5 minutes now, so it wont be a lot of requests and so there wont be any 500 internal server errors. (I don't think)

     

    Thanks everyone for helping with this!

  2. Ajax is light weight. Also you are trying to retrieve data from db only , right? I think that won't make overload in server. I am not sure anyway.

     

    Hi,

     

    Yeah, the page just retrieves the subject of the ticket from the database and then the AJAX loads that page into the div. For example, here is the page that is being loaded into it:

     

    http://weebuild.heliohost.org/employee/sub...?ticket=5156869

     

    As you can see, it's just one line of text.

  3. Hello,

     

    I am using this code to refresh an element every 5000 milliseconds:

     

    <script type="text/javascript">
       function changeTitle() {
       var title = $('.subjectContainer').html();
       document.title = title+' | WeeBuild Customer Support';
       }
    $(document).ready(function() {
         $(".subjectContainer").load("subject.php?ticket=<?php echo $_GET[ticket]; ?>");
       var refreshId = setInterval(function() {
          $(".subjectContainer").load("subject.php?ticket=<?php echo $_GET[ticket]; ?>");
          changeTitle();
       }, 5000);
       $.ajaxSetup({ cache: false });
    });
    </script>

     

    But, will this overload the server I'm on? I want to make sure before I use it. It doesn't seem like anything happens when I try it, but I just want to make sure. The file being loaded just contains a string of text that is retrieved from a database. The reason I am having it refresh is so it stays updated if it gets changed by a user. The server I am on is Stevie.

  4. Whenever you access phpMyAdmin or cPanel File Manager, it opens up lots of processes onto your account. We have a process limit of 7, and if you exceed this limit (by accessing PMA or CFM) then your site temporarily shows an Internal Server Error until 5 minutes after you quit PMA/CFM.

    Hello jje,

     

    Thank you for letting me know that! :) I knew that the limit is 7 processes, I just didn't know that phpMyAdmin and the file manager takes up a lot of processes. Those errors were getting a little annoying and I thought that there was something wrong with the server. Thanks! :D

     

    Also, does that mean whenever I access phpMyAdmin it will always show a 500 error? (I don't usually have that problem with the file manager)

  5. This support request is being escalated to our root admin.

     

    Another weird thing, right when I click "Refresh" while viewing a table in phpMyAdmin, I go to the site, refresh the page and it's a 500 internal server error. I don't know whats going on but this is happening to other people I know too, as they told me when I gave them a URL to it.

     

    Edit: Actually, whenever I do anything in phpMyAdmin (click "Browse", "Structure", Refresh, etc.) it gives me the 500 Internal Server Error and there isn't anything in the error log about it.

  6. Have you checked your Error log at your cPanel?

     

    Hi byron,

     

    Yeah, I checked that and the errors are just like parse errors and stuff, but they wouldn't cause a internal server error I don't think. What happens first is it shows a parse error or syntax error sometimes, I fix it, refresh and it shows an internal server error.

     

    In the database, I would edit a little part, like change something from 0 to 1 and then I go back to the page and it shows a 500 internal server error, but then about 5-10 minutes later it works when I refresh. So I don't know what is going on.

     

    Thanks,

    Nathan

  7. Hello HelioHost,

     

    Recently, my website has had a lot of internal server errors. (500) My username is "pjphost", my domain is weebuild.heliohost.org and the server I am on is Stevie.

     

    Would anyone know why this is happening? It keeps happening every time I edit a value in a database in phpMyAdmin, and it happens other times. I don't know what could be causing this. I made sure the permissions are correct and they are, so I don't know what would be causing this 500 error.

     

    Any help is highly appreciated. :)

×
×
  • Create New...