Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Increase Nginx HelperServer thread stack space on FreeBSD.

  • Loading branch information...
commit 73f59cdfb7c843741f5ae67f5678dc6d2f726419 1 parent 7413b57
Hongli Lai FooBarWidget authored
Showing with 9 additions and 1 deletion.
  1. +2 −0  NEWS
  2. +7 −1 ext/nginx/HelperServer.cpp
2  NEWS
View
@@ -5,6 +5,8 @@ Release 2.2.14
Patch contributed by Evan Phoenix.
* Fixed a mistake in the SIGQUIT backtrace message.
Patch contributed by Christoffer Sawicki.
+ * [Nginx] Fix a localtime() crash on FreeBSD
+ This was caused by insufficient stack space for threads. Issue #499.
Release 2.2.13
8 ext/nginx/HelperServer.cpp
View
@@ -139,7 +139,13 @@ struct ClientDisconnectedException { };
class Client {
private:
/** The client thread stack size in bytes. */
- static const int CLIENT_THREAD_STACK_SIZE = 1024 * 64;
+ static const int CLIENT_THREAD_STACK_SIZE =
+ #ifdef __FreeBSD__
+ // localtime() on FreeBSD needs some more stack space.
+ 1024 * 96;
+ #else
+ 1024 * 64;
+ #endif
/** The client number for this Client object, assigned by Server. */
unsigned int number;
Please sign in to comment.
Something went wrong with that request. Please try again.