public
Description: A very fast & simple Ruby web server
Homepage: http://code.macournoyer.com/thin/
Clone URL: git://github.com/macournoyer/thin.git
Search Repo:
define cleanup and note about segfault in connection.c on high concurrency
macournoyer (author)
Wed Apr 02 16:59:59 -0700 2008
commit  621c237891c6c9eb2d6df63b73281863cc352bd9
tree    8a316554fa6fa95ff7b6753145d178a2b6317299
parent  7907423cf6720a0e668b3075092385f72c8c9dde
...
79
80
81
 
 
82
83
84
...
79
80
81
82
83
84
85
86
0
@@ -79,6 +79,8 @@
0
   /* no free connection found, add more */
0
   if (connection == NULL) {
0
     thin_connections_create(backend->connections, THIN_CONNECTIONS_SIZE);
0
+ connections = backend->connections->items;
0
+ /* FIXME: bug here on high concurrency, causes segfault on line 88 */
0
     connection = &connections[++i];
0
   }
0
   
...
29
30
31
32
33
34
35
 
 
36
37
 
 
 
 
38
39
40
...
29
30
31
 
 
 
 
32
33
34
 
35
36
37
38
39
40
41
0
@@ -29,12 +29,13 @@
0
 #else
0
 #define THIN_LISTEN_BACKLOG 511
0
 #endif
0
-#define THIN_CONNECTIONS_SIZE 300
0
-/* TODO clean this up ... */
0
-#define THIN_MAX_HEADER_SLICES (80 + 32)
0
-#define THIN_MAX_HEADER 1024 * THIN_MAX_HEADER_SLICES
0
+#define THIN_CONNECTIONS_SIZE 100
0
+#define THIN_BUFFER_SLICES 100
0
 #define THIN_BUFFER_SIZE 1024
0
-#define THIN_BUFFER_SLICES THIN_MAX_HEADER_SLICES /* buffer must be able to hold big header */
0
+
0
+/* TODO move this to parser ... */
0
+#define THIN_MAX_HEADER 1024 * (80 + 32)
0
+
0
 
0
 #define LF (u_char) 10
0
 #define CR (u_char) 13

Comments

    No one has commented yet.