Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Spurious Error received while posting comments

hbfhbf MVP
edited December 2011 in Vanilla 2.0 - 2.8

This is admittedly a vague question, as I don't have much in the way of hard data at this point. But I'm going to try debugging an error I'm getting and I thought I would start here with a quick question.

Has anyone else encountered a small error message box while posting comments on their forums? I'm running Vanilla 2, Version 2.0.18. This error seems to be most prevalent during times of heavier loading of the server, and particularly pronounced when a post is going to cause a page transition.

What happens is the user posts, it thinks for a moment then a small popup box displays the word 'error' in it. You can click the little x to close the popup, then everything appears to function fine.

I don't have any more data at this point, it's not exactly easy to replicate the issue either. I've had it happen to me more than a few times. It was a much bigger problem when the site was on a small dev box. But I had a user report the issue today, and this isn't good as there were only maybe 5 people online and posting at the moment and the forum is being hosted on a fairly fast machine, HP Proliant G3.

Tagged:

Best Answer

  • ToddTodd Vanilla Staff
    Answer ✓

    We are aware of this error and have mostly-fixed it in our 2.1 branch.

    Here is what's happening as far as we could tell. When your server is under higher load requests take longer to execute. Vanilla ajax posts back to your server from time to time to do stuff like get messages, save drafts, etc. What happens is that these happen at a set interval and if the next request starts before the previous one has finished then you start getting a real glut of requests on the server.

    We've gone through the javascript and put some locking type code so that the next request of a type won't go if the previous one hasn't finished.

    I'll try and get these fixes back-ported to the 2.0.18 branch, but if you want to know what we did right away here are the commits:

    The second commit also has some other stuff in it and I'm not sure if it will merge completely cleanly.

Answers

  • ToddTodd Vanilla Staff
    Answer ✓

    We are aware of this error and have mostly-fixed it in our 2.1 branch.

    Here is what's happening as far as we could tell. When your server is under higher load requests take longer to execute. Vanilla ajax posts back to your server from time to time to do stuff like get messages, save drafts, etc. What happens is that these happen at a set interval and if the next request starts before the previous one has finished then you start getting a real glut of requests on the server.

    We've gone through the javascript and put some locking type code so that the next request of a type won't go if the previous one hasn't finished.

    I'll try and get these fixes back-ported to the 2.0.18 branch, but if you want to know what we did right away here are the commits:

    The second commit also has some other stuff in it and I'm not sure if it will merge completely cleanly.

  • Thanks @todd, i'll see if i can merge the notifications changes into my install.

    I stopped auto-draft a while back because it was really impacting performance on mobile clients. i think putting a mutex on ajax calls could help with the problem i was seeing there as well. basically if you clicked post while autodraft was posting, you could get one of three results.

    1. no post
    2. post with draft saved, so it shows back up
    3. double post

    thanks for the input. I'll let you know if it resolve the issue.

Sign In or Register to comment.