Support » Plugin: My Tickets » Internal Server Error – Purchase Page

  • Resolved rosalmon

    (@rosalmon)


    Hi Joseph,

    Thanks for creating the plugin. I am testing it and there seems to be an issue.

    1. On the purchase page if I keep hitting add continously to purchase more tickets i.e. the + plus sign and then hit HOME I get an “Internal Server” error. A close look shows a “Out of Memory” on the PHP side. This is because every time you hit the + or – continuously to add or remove, requests are being sent to the server which could possible make your site inaccessible/bring your site down. One way to reduce this is to only allow those buttons to increment and then have a separate “UPDATE” button to send your request to the server. Note there is no issue if you hit the button once and the cart gets updated and then you hit the “HOME” link.

    How can I quickly resolve?

    • This topic was modified 6 years, 1 month ago by rosalmon.
    • This topic was modified 6 years, 1 month ago by rosalmon.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    I guess I’d have to ask the question <b>why</b> you’re doing that? I can see the possibility that it could cause some issues, but I’m not sure why you’d be doing it in the first place. Is there a reason you aren’t just adding more tickets *before* adding it to your cart?

    For the record, on my own test site I wasn’t able to reproduce this problem.

    Thread Starter rosalmon

    (@rosalmon)

    The only reason I am doing that is because it creates validates the potential for a denial of service attack. With that said it’s interesting that you could not replicate it. My php memory limit is 128 which I think should be enough. What’s the limit on your test site and URL if you don’t mind so that I try to validate that the issue is on my end.

    Plugin Author Joe Dolson

    (@joedolson)

    I’m running at 256 MB for a memory limit.

    As a note, it wouldn’t be that easy to do a DoS, as the form will stop registering requests as soon as you hit the number of tickets available.

    Thread Starter rosalmon

    (@rosalmon)

    Joe thanks for responding. I found the issue. I checked your demo site for tickets and saw that hitting the button kicks off the wp-admin/admin-ajax.php which sends the ajax request for update which took about about 435ms to complete while the server (shared hosting) I am using took about 3000ms.Submitting several of the same request results in a Internal Server 500 page error if I try to access any other page before the cart gets updated as the throttled hosting service sees it as a DOS or does not allow too many CPU cycles/IOPS. This is development site so I am no longer worried. Thanks again for your help and you are right hitting the maximum number of tickets will prevent any further registrations.

    https://www.keycdn.com/blog/admin-ajax-php-slow/

    Thread Starter rosalmon

    (@rosalmon)

    Resolved.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Internal Server Error – Purchase Page’ is closed to new replies.