Search found 8 matches

by jwatson
Wed Oct 08, 2008 2:46 pm
Forum: PHP - Code
Topic: Image Server Push - Memory Leak?
Replies: 16
Views: 2735

Re: Image Server Push - Memory Leak?

After trying many different things, I've found the culprit... OLD CODE: $sep = "sOmErAnDoMsTrInGfOrBoUnDaRy"; $header = 'Content-Type: multipart/x-mixed-replace;boundary=' . $sep; header($header); header("pragma: no-store,no-cache"); header("cache-control: no-cache,no-store,...
by jwatson
Tue Oct 07, 2008 5:14 pm
Forum: PHP - Code
Topic: Image Server Push - Memory Leak?
Replies: 16
Views: 2735

Re: Image Server Push - Memory Leak?

No go with ob_end_flush(), the file always exists. Apache seems to be allocating 8K every now and then, for what reason I don't know. Is there a better way to achieve an image push?
by jwatson
Mon Oct 06, 2008 10:53 am
Forum: PHP - Code
Topic: Image Server Push - Memory Leak?
Replies: 16
Views: 2735

Re: Image Server Push - Memory Leak?

Turning off output buffering does NOT work.
by jwatson
Fri Oct 03, 2008 3:19 pm
Forum: PHP - Code
Topic: Image Server Push - Memory Leak?
Replies: 16
Views: 2735

Re: Image Server Push - Memory Leak?

I know I am kind of forced into this design by someone's bad code. Originally I wanted to use the AJAX approach and it was beautifully working until this point. Turn off output buffering eh? I'll try it, at this point I am suffering an apache module written in C++ to attempt the same thing. Thanks f...
by jwatson
Thu Oct 02, 2008 7:55 pm
Forum: PHP - Code
Topic: Image Server Push - Memory Leak?
Replies: 16
Views: 2735

Re: Image Server Push - Memory Leak?

I think we are missing the design concept of server push here. There is no request being made by the client except for the initial request only. The server spawns this PhP thread to endlessly stream image updates via content type multipart/x-mixed-replace telling the application to replace its conte...
by jwatson
Thu Oct 02, 2008 4:59 pm
Forum: PHP - Code
Topic: Image Server Push - Memory Leak?
Replies: 16
Views: 2735

Re: Image Server Push - Memory Leak?

Nope I must have an endless server push to achieve what I want. Basically I have a camera generating an image on the server which I want to push out to the connected client.

I already have a polling version working, but I need to achieve a push version as well.
by jwatson
Thu Oct 02, 2008 1:11 pm
Forum: PHP - Code
Topic: Image Server Push - Memory Leak?
Replies: 16
Views: 2735

Re: Image Server Push - Memory Leak?

Yeah the httpd process (apache) is gaining memory over time. Is there any way to flush out this memory in each loop through the PhP? Maybe some kind of PhP.ini setting or something?
by jwatson
Thu Oct 02, 2008 11:58 am
Forum: PHP - Code
Topic: Image Server Push - Memory Leak?
Replies: 16
Views: 2735

Image Server Push - Memory Leak?

I basically wrote a server image push in PhP which is basically the following:   $sep = "sOmErAnDoMsTrInGfOrBoUnDaRy"; $header = 'Content-Type: multipart/x-mixed-replace;boundary=' . $sep; header($header); header("pragma: no-store,no-cache"); header("cache-control: no-cache,...