Hi All,
I use register_shutdo wn_function to register a function that then gets run
when the script finishes executing. It worked great before, but sometime
last week on my development server all my sites started going very slowly.
It is still running fine on the production server (thankfully).
Nothing was changed. In fact, I was out of town that week, and the dev
server was powered off.
I did a little investigation, trying to locate the source of the slowdown,
and eventually I narrowed it down to the line:
register_shutdo wn_function('si teShutdown');
Commenting out that line made things run perfectly again (generates within
20-80 ms, depending on the page size). Uncomment it, and the page takes 3-4
seconds to generate. It does not generate piecemeal, either; it is blank
for several seconds, then in blink, the entire page arrives.
Has anyone got any ideas? What could cause this, and how could it suddenly
start happening, without me making any changes?
Sincerely,
-Josh 2 1914
On Wed, 02 Jun 2004 12:22:06 GMT, "Joshua Beall"
<jb****@donotsp am.remove.me.he raldic.us> wrote: Hi All,
I use register_shutdo wn_function to register a function that then gets run when the script finishes executing. It worked great before, but sometime last week on my development server all my sites started going very slowly. It is still running fine on the production server (thankfully).
Nothing was changed. In fact, I was out of town that week, and the dev server was powered off.
I did a little investigation, trying to locate the source of the slowdown, and eventually I narrowed it down to the line:
register_shutd own_function('s iteShutdown');
Commenting out that line made things run perfectly again (generates within 20-80 ms, depending on the page size). Uncomment it, and the page takes 3-4 seconds to generate. It does not generate piecemeal, either; it is blank for several seconds, then in blink, the entire page arrives.
Has anyone got any ideas? What could cause this, and how could it suddenly start happening, without me making any changes?
Sincerely, -Josh
based on the experiences i've had with register_shutdo wn_function, it
seems that, while it makes the function you specify the last function
executed, it doesn't make it execute after the connection has been
closed. the work around to this that i used involved sending a whole
new http request, with fsocketopen and fputs, but never reading the
data. the script i would send the request to would check to see if
the originating ip address of the request was the same as the server's
ip address, among other things. not a particurarly pretty solution,
but whatever, heh.
Joshua Beall wrote: register_shutdo wn_function('si teShutdown');
Commenting out that line made things run perfectly again (generates within 20-80 ms, depending on the page size). Uncomment it, and the page takes 3-4 seconds to generate. It does not generate piecemeal, either; it is blank for several seconds, then in blink, the entire page arrives.
I use this function regularly without any problems - suggest U look at what
you are doing within function siteShutdown()
C. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: |
last post by:
Hi all !
I am using register_shutdown_function. It behaves something
strange.
register_shutdown_function("f1");
register_shutdown_function("f2");
they fire in sequence
f1
|
by: Derek Battams |
last post by:
I want to ensure that I'm releasing a lock on a file after _all_ objects
have been destroyed. What I'm trying to do is use
register_shutdown_function to call a function that releases the lock on
the file then closes it. Testing is showing that the registered
function is being called before all objects are destroyed. Is this
expected behaviour? Is there a way to get the desired functionality?
This is a standalone shell script/applicaton...
|
by: yawnmoth |
last post by:
Say I have the following PHP script:
<?
register_shutdown_function('test');
ob_start();
echo "part2";
function test()
{
$output = ob_get_contents();
|
by: alex bazan |
last post by:
I came across this function as i got a problem with very long-running
scripts which use transactions...
in the php manual i do not see clearly stated if the function defined
will be executed if a timeout is reached.
It states:
"Registers the function named by function to be executed when script
processing is complete."
|
by: bw |
last post by:
I have a basic custom collection that throws a new
exception if the item(key) is not found in the collection.
This is used as part of a calling function. It all works
correctly, the problem (discovered using a memory
profiler) is that the base exception being thrown in the
collection is not being disposed of.
I understand about the GC etc etc. It appears that
something is hanging on to a reference to System.Exception
and a...
| |
by: rishabhshrivastava |
last post by:
Hello All,
I am using ASP.NET 2.0 and I am experiencing a problem using vbscript
that is this script on client side is preventing the postback of my
controls.
I have a dropdownlist which is supposed to perform some fucntion when
the selected index is changed, it works fine without vbscript code(when
i comment out that code) but when I uncomment the code the postback
dosen't happen.
|
by: mthomsit |
last post by:
Hi,
I have a script which after a time shows the following error in IE:
"A script on this page is causing Internet Explorer to run slowly. If
it continues to run, your computer may become unresponsive".
The page is quite complex and uses ajax to post updates to the server,
updating parts of the page based on the response. It uses YUI (event
and dom mainly). There are no infinite loops or similar constructs.
|
by: Lawrence Krubner |
last post by:
Does anything about this script look expensive, in terms of resources or
execution time? This script dies after processing about 20 or 25
numbers, yet it leaves no errors in the error logs. This is on a server
that handles a fairly demanding site. The defaults, in php.ini, have all
been cranked fairly high: scripts get 180 seconds to run, and they can
have as much as 256 megs of RAM.
The input for this script is coming from a textarea in...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |