Project

General

Profile

Bug #1747

openssl blocks

Added by HenrikHolst about 11 years ago. Updated about 3 years ago.

Status:
Obsolete
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:
Yes

Description

the network_openssl.c backend blocks the whole of lighttpd during send of a file.

On most connections this is not noticed since SSL_write will return SSL_ERROR_WANT_WRITE and the loop will break so that lighttpd can process the other connections. But on a local GB-lan using cURL (and also on the local loop using both wget and cURL) it is possible to completely lock up lighttpd during a file transfer over ssl.

The problem is that network_write_chunkqueue_openssl loops over all the data in the chunkqueue until SSL_Write complaints.

I have tried to remove the looping alltogether (meaning that lighttp would only send one block 64Kib before proceeding to the other connections) and that worked out just fine, I can see no slowdown when for example working with localhost so even though lighttpd no longer sends the data in a tight loop the performance seams to be mostly unaffected (probably due to the inherent bad performance in ssl anyways).

network_openssl.c.patch (4.9 KB) network_openssl.c.patch patch for v1.5-svn HenrikHolst, 2008-08-08 13:20

History

#1

Updated by stbuehler almost 11 years ago

See #1070

#2

Updated by HenrikHolst almost 11 years ago

#1070 looks to be similair but for when receiving data via SSL, this patch is when sending out data. Or did the #1070 patch fix for sending aswell?

#3

Updated by gstrauss about 3 years ago

  • Description updated (diff)
  • Assignee deleted (jan)
  • Priority changed from Urgent to Normal
  • Missing in 1.5.x set to Yes

FYI: lighttpd 1.4.x has an upper limit and writes a max of 256k (MAX_WRITE_LIMIT in settings.h) on each call.

#4

Updated by gstrauss about 3 years ago

  • Status changed from New to Obsolete

Also available in: Atom