Ssl write failed

2008/05/09 18:25:44 [crit] 15521#0: *168933 SSL_write() failed (SSL:
error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry) while
sending to client, client: 81.252.180.89, server:
secure.thepinkpatch.co.uk, request: “GET /s-TPP/lp HTTP/1.0”,
upstream: “memcached://127.0.0.1:11211”, host:
secure.thepinkpatch.co.uk

is this an error in the underlying ssl code or in nginx?

On Fri, May 09, 2008 at 01:30:26PM -0400, Sean A. wrote:

2008/05/09 18:25:44 [crit] 15521#0: *168933 SSL_write() failed (SSL:
error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry) while
sending to client, client: 81.252.180.89, server:
secure.thepinkpatch.co.uk, request: “GET /s-TPP/lp HTTP/1.0”,
upstream: “memcached://127.0.0.1:11211”, host:
secure.thepinkpatch.co.uk

is this an error in the underlying ssl code or in nginx?

What nginx version do you use ?
This error should be fixed in 0.6.26 and 0.5.36.

On May 9, 2008, at 1:40 PM, Igor S. wrote:

What nginx version do you use ?
This error should be fixed in 0.6.26 and 0.5.36.

that machine is a 0.5.35 i’ll upgrade and see what happens.

is anyone working on a h.264 mod , that allows for streaming like the
flv mod?

i only ask because a friend was needing h264 support, and lighty has
it now ( http://h264.code-shop.com/trac ) but nginx doesn’t

// Jonathan V.

w. FindMeOn®.com : connect your online profiles
e. [email protected]

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Privacy Minded Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


On May 9, 2008, at 5:12 PM, Sean A. wrote:

upstream: “memcached://127.0.0.1:11211”, host:
secure.thepinkpatch.co.uk

is this an error in the underlying ssl code or in nginx?

What nginx version do you use ?
This error should be fixed in 0.6.26 and 0.5.36.

that machine is a 0.5.35 i’ll upgrade and see what happens.

that seems to have done the trick.

I’m not sure manipulating mp4 files is a good idea in a single process
server. Also Adobe released a new FLV specification a few days ago that
supports h264, so there is no real need for supporting mp4 files,
because
the flv streaming module already works.

Sergej

Yes it will work. The only question is, if there is an encoder out yet
that
can save h264 video in flv. I know the ffmpeg guys were working on it.

On Fri, Jun 13, 2008 at 06:03:49PM -0700, mike wrote:

So does the nginx “flv” module work out of the box properly with the
latest methods of doing h.264/flash video streaming?

I just wanted to ask, I have not used it yet but may need to soon. I
assume it works in conjunction with .swf players that use the
?start=XXX type method to be able to skip throughout the file properly
(since it’s not a progressive download?)

Yes, nginx does not know anything about flv file structure.
It’s player job to request correct ?start=XXX.

Okay, so can I ask then what exactly the “flv” thing does in nginx?

HTTP supports resuming from a byte offset already, what is so special
about flv?

So does the nginx “flv” module work out of the box properly with the
latest methods of doing h.264/flash video streaming?

I just wanted to ask, I have not used it yet but may need to soon. I
assume it works in conjunction with .swf players that use the
?start=XXX type method to be able to skip throughout the file properly
(since it’s not a progressive download?)

On Fri, Jun 13, 2008 at 10:31:18PM -0700, mike wrote:

Okay, so can I ask then what exactly the “flv” thing does in nginx?

HTTP supports resuming from a byte offset already, what is so special about flv?

When nginx gets “?start=XXX” query string, it sends constant 13-byte FLV
header followed by file starting from the requested offset.
You may see similar PHP code flvprovider.php at

followup question:

can a PHP script sending the X-Accel-Redirect: /path/to/file.flv
header also take advantage of the nginx flv functionality?

On Fri, Jun 13, 2008 at 10:41:08PM -0700, mike wrote:

followup question:

can a PHP script sending the X-Accel-Redirect: /path/to/file.flv
header also take advantage of the nginx flv functionality?

Yes, but do not forget “start”:

X-Accel-Redirect: /path/to/file.flv?start=XXX

Besides, nginx can handle flv only as static file, i.e. the request
can not be proxied, etc. However, you can use nginx on storage backends:

nginx/proxy_buffering off  ->   nginx/FLV
                                nginx/FLV
                                nginx/FLV

So pseudo code for a file named “/videoplay.php”:

header(“Content-type etc…”)

if(isset($_GET[‘start’])) {
$start = intval($_GET[‘start’]);
header(“X-Accel-Redirect: /path/to/file.flv?start=$start”);
} else {
header(“X-Accel-Redirect: /path/to/file.flv”);
}

and in nginx.conf, I could have:

location /videoplay.php {
flv;
}

would this work together?

Problem is we need to use PHP to authenticate the user is allowed to
see the flv file… Igor says it can be used with X-Accel-Redirect.

So if the path was

/video/view/play.php?file=12345

I could do:

location /video/view/ {
flv;
}

and that would work? Thanks a ton.

I guess it might also be possible to look at outputting the magic FLV
byte string instead of piggybacking it on nginx … hmm

Hello!

On Mon, Jun 16, 2008 at 01:07:20PM -0700, mike wrote:

and in nginx.conf, I could have:

location /videoplay.php {

-location /videoplay.php {
+location /path/to/ {

flv;
}

would this work together?

You should use flv on actual files, not on your php script.

Maxim D.

On Mon, Jun 16, 2008 at 01:07:20PM -0700, mike wrote:

and in nginx.conf, I could have:

location /videoplay.php {
flv;
}

would this work together?

 location = /videoplay.php {
      proxy_pass or fastcgi_pass
 }

 location /path/to/ {
      internal;
      flv;
      root  ...
 }

On 6/17/08, Igor S. [email protected] wrote:

location = /videoplay.php {
     proxy_pass or fastcgi_pass
}

location /path/to/ {
     internal;
     flv;
     root  ...
}

Is there a debugging option available that would show something like

“X-Accel-Redirect triggered for URL: /foo/bar/baz.php?start=1234”
“FLV byte triggered for request”

a couple things like that? I’m just trying to figure out once I set
this up how to sanity check it’s doing all the magical FLV bytes too.

Thanks a lot Igor - just FYI I gave you “Respect Knuckles” on my
website recently :slight_smile:
http://michaelshadle.com/2008/06/14/rk-igor-sysoev/

On Tue, Jun 17, 2008 at 11:56:39AM -0700, mike wrote:

}

Is there a debugging option available that would show something like

“X-Accel-Redirect triggered for URL: /foo/bar/baz.php?start=1234”
“FLV byte triggered for request”

a couple things like that? I’m just trying to figure out once I set
this up how to sanity check it’s doing all the magical FLV bytes too.

No, only a full debug log.
You should egrep for “(internal redirect|flv filename)”

Thanks a lot Igor - just FYI I gave you “Respect Knuckles” on my
website recently :slight_smile:
The Life and Times of Michael Shadle » RK: Igor Sysoev

Thank you, although I do not understand some idioms :slight_smile:

On Tue, Oct 7, 2008 at 3:16 PM, Thomas [email protected] wrote:

Is it coming from the metadata that is positionned at the end of the
video file instead of at the beginning?

Did anyone manage to create a streamable flv video with h264 format?

I am on the Adobe FMS beta program - I can probably provide you some
FLV content authored by Flash Media Encoder 3.x if you want to test it
(FLV with H264). Let me know…

Cheers
Kon