#44 ✓not_for_core
Peter Rekdal Sunde

Timeout in Ajax.PeriodicalUpdater

Reported by Peter Rekdal Sunde | April 24th, 2008 @ 05:29 PM

When you use the Ajax.PeriodicalUpdater and have around 10,000 requests per second, and one server stats failing this little patch will cancel the Ajax request after x seconds (if there is no response server) so that apache kills the worker thread (Keep-Alive). This has been very usefull for us when a server dies.

			onCreate: function(request) {
				this.requestId = window.setTimeout(function() {
					if (request.transport.readyState == 1 || request.transport.readyState == 2 || request.transport.readyState == 3) {
						if (request.options['onFailure']) {
							request.options['onFailure'](request.transport, request.json);
				}, 4000);

Comments and changes to this ticket

  • Tobie Langel

    Tobie Langel April 24th, 2008 @ 06:17 PM

    • State changed from “new” to “not_for_core”

    Thanks for your ticket. We think this might be better implemented as a plugin rather than in the framework itself.

    Don't forget to register your plugin on Scripteka once it's completed so that the community can benefit from it.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket