Behaviour Records hangs after submitting problems

Hi all i am having an other problem with Behaviour Records when teachers are writing Behaviour Records the page just get stuck after clicking submit button, the page looks like its going to load back to Behaviour Records page with the newly report but it doesn't it just hangs on the Add page and then times out saying
(((( Gateway Timeout The gateway did not receive a timely response from the upstream server or application. Additionally, a 504 Gateway Timeout error was encountered while trying to use an ErrorDocument to handle the request.. )))))
i thought it might be the max_input_vars so i used it to 10000 just to see if that was the problem but after doing that i am getting the same issue anyone know what might be causing this to happen?

PS i had this problem before on a shared hosting server with hostgator and never figured out what the problem was even with help from HostGator Tec team, thats why i moved to our own server which has been running now for 2 to 3 months fine and now the problem is back once more.
«1

Comments

  • I for got to say i have restarted the router and the web server with no luck to fixing the problem, note that our web server is on the same local network as the class room computers but they access the web server VAI the public IP address as any one outside of the school would like a parent at home.
  • Orlando, this is a very unusual problem. Have you checked your PHP error logs to see if that sheds any light on the issue? Ross.
  • Hi Ross

    Please find the Error log from the Behaviour folder can't make heads or tails of it hope you might find why i am having the problems thanks
  • Orlando,

    Two possible issues are shown below:

    PHP Warning: require(/home/svserver/public_html/teachersadmin/lib/PHPMailer/PHPMailerAutoload.php): failed to open stream

    PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away'

    The first is just a warning, and whilst it sounds serious, the result should be emails (probably notifications) not being sent out, rather than total failure.

    The second, which occurs around 300 times in the error file you sent is much more serious, and would explain the behaviour you are seeing. What might cause your MySQL server to have "gone away" I can't say. I've seen cases where a server gets hit with lots of requests by an attacker, and this causes memory exhaustion, leading to MySQL failing to respond, so that is one option, but there are plenty of others.

    What server OS and version are you running?

    Ross
  • Hi Ross i am running CENTOS 7.3 x86_64 standard – server cPanel & WHM 64.0 (build 29)
    i know at the end of the day around 14 to 15 of our teachers log on to input data and each of them have there own user and password could this be casing the problem when alot of users try to log on round the same time and if so how can i fix this problem thanks orlando
  • @orlando Are you still experiencing the same problem? were you able to solve? If not please let me know we try to debug it together.
  • Hi Jmsperu no i was not able to fix the problem still ongoing let me know what you would need from me to enable a solotion to this problem.

    thanks orlando
  • Well you can send me an email on james.peru@xcobean.org Then we can go through the issue step by step
  • Hi Jasperu and Ross i think i found what the problem is and need your help to fix it i had a look at the error logs today and found ((((( [07-Jul-2017 13:48:23 Europe/London] PHP Fatal error: Uncaught Error: Call to a member function prepare() on null in /home/svserver/public_html/streetvibes.academy/functions.php:4031
    Stack trace:
    #0 /home/svserver/public_html/streetvibes.academy/index_notification_ajax.php(43): getSettingByScope(NULL, 'System', 'alarm')
    #1 {main}
    thrown in /home/svserver/public_html/streetvibes.academy/functions.php on line 4031
    ))))))
    I had a look at the functions.php file on line (( 4031 )) and found a syntax error X icon next to

    $rollGroups[$count][3] .= "\$(\".show_hide-$count2\").click(function(){";

    Any ideas why this is happening ? i think this is my problem to my
    Behaviour Records hangs
  • Sorry i meant on line 687
  • Hi all i went back and change my php from ea-php70 to ea-php55 that seem to fix the error on 687 in functions.php not sure if it has fixed my Behaviour Records hangs its late Friday and all the staff has gone home so will have to wait till Monday and let you all know if the problem came from using PHP Version ea-php70
  • Orlando, OK, that is interesting. Let us know how you get on. PHP7 should work fine, that is what @sandra and I both run for our schools in production, with no issues.

    In terms of capacity, it depends on your hardware as much as your server software. As a point in reference, I run a single HP Proliant server for my school of 1500+ users. It is 8 years old, has a quad-core Intel Xeon processor and 10GB of RAM. Even when we are making heaving use of the system for teaching and learning with 200+ users on the site at the same time, it rarely runs over 5% utilisation.

    So...I don't think it is a capacity issue causing your issue...but I guess it could be some kind of resource locking issue.

    Ross
  • Hi Ross i had staff try yesterday and the problem is still there on PHP55 so your right its not that so i am at a lost ? do you think this is a database problem or php problem i am thinking to just reinstall Gibbons and link it back to the database but this is only good if the problem is with the site files? i had a look at my error logs today and i am getting alot of errors from line 4031 in functions.php have a look

    #0 /home/svserver/public_html/streetvibes.academy/index_notification_ajax.php(43): getSettingByScope(NULL, 'System', 'alarm')
    #1 {main}
    thrown in /home/svserver/public_html/streetvibes.academy/functions.php on line 4031
    [30-Jun-2017 15:23:58 Europe/London] PHP Fatal error: Uncaught Error: Call to a member function prepare() on null in /home/svserver/public_html/streetvibes.academy/functions.php:4031
    Stack trace:
    #0 /home/svserver/public_html/streetvibes.academy/index_notification_ajax.php(43): getSettingByScope(NULL, 'System', 'alarm')
    #1 {main}
    thrown in /home/svserver/public_html/streetvibes.academy/functions.php on line 4031
    [07-Jul-2017 13:48:19 Europe/London] PHP Fatal error: Uncaught Error: Call to a member function prepare() on null in /home/svserver/public_html/streetvibes.academy/functions.php:4031
    Stack trace:
    #0 /home/svserver/public_html/streetvibes.academy/index_notification_ajax.php(43): getSettingByScope(NULL, 'System', 'alarm')
    #1 {main}
    thrown in /home/svserver/public_html/streetvibes.academy/functions.php on line 4031
    [07-Jul-2017 13:48:23 Europe/London] PHP Fatal error: Uncaught Error: Call to a member function prepare() on null in /home/svserver/public_html/streetvibes.academy/functions.php:4031
    Stack trace:
    #0 /home/svserver/public_html/streetvibes.academy/index_notification_ajax.php(43): getSettingByScope(NULL, 'System', 'alarm')
    #1 {main}
    thrown in /home/svserver/public_html/streetvibes.academy/functions.php on line 4031
    [07-Jul-2017 13:48:36 Europe/London] PHP Fatal error: Uncaught Error: Call to a member function prepare() on null in /home/svserver/public_html/streetvibes.academy/functions.php:4031
    Stack trace:
    #0 /home/svserver/public_html/streetvibes.academy/index_notification_ajax.php(43): getSettingByScope(NULL, 'System', 'alarm')
    #1 {main}
    thrown in /home/svserver/public_html/streetvibes.academy/functions.php on line 4031
    [07-Jul-2017 13:48:43 Europe/London] PHP Fatal error: Uncaught Error: Call to a member function prepare() on null in /home/svserver/public_html/streetvibes.academy/functions.php:4031
    Stack trace:
    #0 /home/svserver/public_html/streetvibes.academy/index_notification_ajax.php(43): getSettingByScope(NULL, 'System', 'alarm')
    #1 {main}
    thrown in /home/svserver/public_html/streetvibes.academy/functions.php on line 4031
  • has anyone had a look at my 4031erros ? please can anyone tell me why i am getting it
  • @orlando
    Is there a way I can see the error being generated? Like to replicate the issues, see the error log or something..
  • Orlando, I am on the road with limited tech for another 8 days, but will reply on return to action. Sorry! Ross.
  • Thats fine and thanks for the reply
  • Hi jasperu the text above was lifted from the error logs i can tell you that i have setup a other test gibbons website and i am not getting any errors from line 4031 in functions.php i then moved my phpmyadmin database of the main site with the problem over to the new test site and the problem came back so the issue is in my phpmyadmin database for the main site somewhere
  • Orlando, interesting case. It seems that the issue is originating on line 43 of /index_notification_ajax.php, which is attempting to pass a NULL value as the database connection. The question is, what is causing the database to be null. I am wondering if this is to do with a timeout issue. Is it happening as soon as you log in, or only after a certain duration? Ross.
  • Hi Ross sorry for the late reply this happens as soon as you login on any user i am going a bit crazy with this problem as i can't find why this is happening i installed a test gibbons site on a sub domain and it works fine with no problems so the problem exist only in this database. was thinking of just starting scratch and install a new gibbons and input all the schools data but this is going to be a long process unless you might have a fix for me if you need access to my database to have a closer look let me know.

    thanks orlando
  • Orlando,

    Hmmm, I am at a loss as to how to troubleshoot this one without access to your server. If you want, you could email login credentials to your Gibbon interface and your server (SSH would be great) to support@gibbonedu.org, and I can log in and try and solve it.

    Otherwise, backup the entire database, and try to install again and rebuild, and see if the issue does not return.

    Let me know!

    Thanks,

    Ross
  • Hi Ross i just emailed you the login information to my server let me know if you received it.

    Thanks Orlando
  • Orlando, sorry for the delay in replying. I got your email, I'm into CPanel, and I am now looking into the issue. Hopefully I'll have something for you in 30 minutes or so.
  • Orlando, I cannot replicate this issue with your database on my local server...which means it is very hard for me to help you without working on your live server....and most likely is an issue on your server.

    I did notice that there seems to be no students enrolled (even though there are some users with the role Student), and so I had to enrol some students myself. After this, I could add individual and multiple records, and edit them to. No hanging, errors, etc.

    Do you want me to play with your live server to see what I can do?

    Ross
  • Hi Ross i have made a new school year 2017-2018 and was having problems rolling over the students from 2016-2017 year thats why there theres no students listed i have re-activate school year 2016-2017 once more so now you should see students sorry about that let me know how you get on.
  • Hi Ross further to the school year rolling over from 2016-2017 to 2017-2018 i tried doing it once more and still not working when i do it its saying success but when i make 2017-2018 active i am only seeing staff but no students not sure if this is all linked to the same problem or if this is a new one
  • I think this is a separate issue, but this is not a bug, just that some information is missing. Before you do the rollover, make sure that there are form groups set up in 2017-18. This allows you to select the form group into which students are going when you do the rollover, in the Re-Enrol Existing Students section.

    If you want to preset the form groups in this section you can do so by editing form groups in 2016-17 and selecting a 2017-18 form group in the Next Form Group dropdown. Alternatively, if your form groups are getting mixed up, you can go to People > Students > Student Enrolment, select 2017-18, and hand enrol those kids who are changing groups. This will make the rollover faster, as things are set up in advance.

    Let me know if you want me to take a look at your production site to see about the behaviour issue.

    Ross
  • Hi Ross thanks for that i have manage to move the students over to the new school year with your help, as for the problem with the Behaviour Records i will have a look at my server to see where the problem is coming from
  • Orlando, I feel terrible, as this slipped off my radar under a rising tide of emails! Did you manage to solve the issue, or is it still outstanding? Ross.
  • Hi Ross i manage to fix the problem yes i updated my MariaDB and all was ok after that sorry for the late reply been doing mid term assessments.
    I am still unsure why i was getting that problem but i am happy its gone :)
    admin
Sign In or Register to comment.