Commit Graph

1320 Commits

Author SHA1 Message Date
Igor Sysoev
9416a342b2 Fixed building by modern GCC. 2017-09-27 19:43:26 +03:00
Igor Sysoev
bfa808d689 Event engine memory cache for nxt_sockaddr_t.
Introducing event engine memory cache and using the cache for
nxt_sockaddr_t structures.
2017-09-27 19:22:59 +03:00
Sergey Kandaurov
752038eea8 Fixed building with pthread_t defined as a pointer. 2017-09-27 18:34:24 +03:00
Igor Sysoev
6b0a3aed22 Style fixes. 2017-09-25 18:04:11 +03:00
Max Romanov
2ae0449262 Checking mallopt() during configure.
mallopt() is absent on Alpine musl.
2017-09-25 17:53:10 +03:00
Valentin Bartenev
45c1d41f34 Removed fibers from compilation.
It's not used anyway, but breaks building with musl.

This closes issue #5 on GitHub.
2017-09-22 16:42:42 +03:00
Max Romanov
4f7e00ef34 Fixing shared memory thread safety issue.
Do not reuse shared memory segment with different port until this segment
successfully received and indexed on other side. However, segment can be used
to transfer data via the port it was sent at any time.
2017-09-18 17:35:24 +03:00
Valentin Bartenev
75a6325656 Fixed memory leak caused by mempool related to request context.
The previous attempt of fixing this in e5a65b58101f hasn't been really
successful, because the actual memory leak was caused not by the request
parse context itself, but its memory pool.
2017-09-16 05:36:06 +03:00
Igor Sysoev
e5b4594376 Go: Fixed a bug introduced in the previous changeset. 2017-09-15 22:31:01 +03:00
Max Romanov
838d9946ac Introducing named port message handlers to avoid misprints. 2017-09-15 20:30:34 +03:00
Max Romanov
1449e27cb4 Fixing memory leak of request parse context. 2017-09-15 20:30:29 +03:00
Max Romanov
0bec14878e Introducing application timeout. 2017-09-15 20:30:24 +03:00
Valentin Bartenev
90ae152ce0 Fixed port handlers arrays. 2017-09-15 14:38:22 +03:00
Igor Sysoev
7c1db30994 Router: more logical code order change.
Updating the router engines list before posting jobs to worker thread
engines is more logical because worker threads may exit after the posting.
However, the previous code was safe because an engine is freed by
the router main thread after worker its thread has exited.
2017-09-15 12:27:24 +03:00
Igor Sysoev
309ba5abf2 Router: fixed segmentation fault.
The router process exited abnormally on reconfiguration if number
of worker threads had been decreased on the previous reconfiguration.
Besides the list of router engines should be updated only after a new
configuration joints have been prepared for all engines.
2017-09-14 22:30:38 +03:00
Valentin Bartenev
4953e5b5cb Configuration persistence.
Now configuration survives server reloads.
2017-09-10 06:22:15 +03:00
Igor Sysoev
72c3e08158 Router: worker threads should quit only if the main thread has
requested this.
2017-09-14 19:53:25 +03:00
Igor Sysoev
4d5e39e8c1 Fixed textual socket name lengths and Unix domain sockaddr length. 2017-09-14 18:16:22 +03:00
Nick Shadrin
f3280c5dc9 Fixed error messages grammar. 2017-09-12 21:14:40 +03:00
Andrei Vagin
962f127939 Fixed a memory leak.
This closes #2 RP on GitHub.
From f13cca01b7aa489dcb6909513f2b781b36ac7fea
2017-09-08 14:10:48 -07:00
Sergey Fedchenko
22c6805949 Cosmetic fixes in port.go.
This closes #5 on GitHub.
From 615369a29511c6021e5623070f082fdb17ff37a2
2017-09-08 14:10:23 -07:00
Max Romanov
d87a4fb642 Moving body data before headers for PHP POST.
PHP SAPI tries to read body for POST request before registering
header-specific variables. For other methods, read_post_body() called by SAPI
after variables registration.

This closes #10 issue on GitHub.
2017-09-07 16:39:31 -07:00
Max Romanov
999de31e25 Spreading user validation for php and go apps. 2017-09-06 08:59:18 -07:00
Igor Sysoev
37c16d1801 Fixed building by Sun C on Solaris. 2017-09-06 17:13:18 +03:00
Igor Sysoev
58907888e5 Style fixes. 2017-09-06 02:30:55 +03:00
Igor Sysoev
22ae3d4ff5 Controller: validating user and group names. 2017-09-06 02:30:23 +03:00
Max Romanov
f0723995a7 Fixing request id logging. 2017-09-05 15:56:37 -07:00
Max Romanov
0f9f0ca522 Fixing racing condition on app port release/request.
Application free ports is a queue (double linked list) protected with mutex.
After successfull request parsing, each router thread (1) tries to get port
from this list. If this list is empty, (2) start worker request posted to main
router thread. Another thread may release port between (1) and (2).

This fix adds an attempt to get port from free ports list at the beginning of
start worker action in main thread.
2017-09-05 15:56:35 -07:00
Max Romanov
c937b8434a Double connection close attempt fix. 2017-09-05 10:22:46 -07:00
Max Romanov
1429cacd17 Using CSTRZ mapping type for go executable. 2017-09-05 10:22:45 -07:00
Max Romanov
f1685e371f Introducing working_directory directive for applications. 2017-09-05 10:22:44 -07:00
Igor Sysoev
ff515f4312 Added SERVER_ADDR parameter for Python and PHP modules. 2017-09-01 07:54:01 +03:00
Igor Sysoev
9941b0cd65 Fixed format specifier. 2017-08-31 21:44:37 +03:00
Max Romanov
6eb4a41364 Multiplexing different requests in single app port. 2017-08-31 11:42:12 -07:00
Max Romanov
fc687e0508 Default value 1 for number of workers. 2017-08-31 11:42:11 -07:00
Sergey Kandaurov
f27ed60a09 PHP SAPI: typo fixed. 2017-08-31 15:16:18 +03:00
Igor Sysoev
738ca54ded Changed modules names format. 2017-08-31 00:42:16 +03:00
Igor Sysoev
f0e9e3ace9 nginext has been renamed to unit. 2017-08-31 00:42:16 +03:00
Igor Sysoev
6160683544 Introduced module compatibility vector. 2017-08-31 00:42:12 +03:00
Max Romanov
e06872e2f2 Avoid nxt_port_mmap_header_t redefinition warning. 2017-08-30 14:34:31 -07:00
Max Romanov
d3f19d98ca Avoid nxt_go_process_t redefinition warning. 2017-08-30 12:08:29 -07:00
Max Romanov
a33145d614 ListenAndServe changed to be compatible with http.ListenAndServe. 2017-08-30 11:50:33 -07:00
Max Romanov
9537821f3f Send remote address to go application. 2017-08-30 11:50:29 -07:00
Max Romanov
9791b09ce3 Fixed pid_file pattern misprint introduced in 231:6832cdee961e. 2017-08-30 11:50:16 -07:00
Igor Sysoev
a812579842 Adding a missing slash to the tail of path set by --modules
command line option.
2017-08-30 21:44:39 +03:00
Igor Sysoev
740dc67ec8 The discovery process did not quit if no modules were not found. 2017-08-30 03:18:56 +03:00
Valentin Bartenev
55fe80600c Controller: resending configuration to router after its restart.
Now router crash can be survived with less damage.
2017-08-30 03:10:13 +03:00
Valentin Bartenev
f528cb393a Controller: waiting for router before start to accept connections.
Previously, reconfiguration might fail right after the daemon start
if the router process wasn't ready yet.
2017-08-30 03:10:13 +03:00
Valentin Bartenev
e21dbf89e6 Controller: correct handling of missing router port.
There's no router port if the router process is just crashed
or hasn't started yet.
2017-08-30 03:09:06 +03:00
Igor Sysoev
cdc7e4479f Lib unit tests have been renamed to tests. 2017-08-30 00:31:02 +03:00