Project

General

Profile

Actions

Bug #1747

closed

openssl blocks

Added by HenrikHolst over 16 years ago. Updated over 8 years ago.

Status:
Obsolete
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

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).


Files

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

Updated by stbuehler about 16 years ago

See #1070

Actions #2

Updated by HenrikHolst about 16 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?

Actions #3

Updated by gstrauss over 8 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.

Actions #4

Updated by gstrauss over 8 years ago

  • Status changed from New to Obsolete
Actions

Also available in: Atom