Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Found by Coverity (CID 215301).
|
|
|
|
New optional configuration parameter introduced: limits.reschedule_timeout.
Default value 1 second. In the case when request is written to the port
socket 'in advance', it is called 'pending'.
On every completed request, the head of pending request is checked against
reschedule timeout. If this request waiting for execution longer than
timeout, it is cancelled, new port selected for this request.
|
|
|
|
Application timeout limits maximum time of worker response in processing
particular request. Not including the time required to start worker,
time in request queue etc.
|
|
This patch increase precedence of non-started worker over busy worker.
1. idle worker;
2. start new worker;
3. busy worker, but can accept request in advance;
|
|
|
|
|
|
Finalizing Python interpreter.
This closes #65 issue on GitHub.
|
|
|
|
The level hash uses the NULL value as the indicator of a free entry in a bucket.
So, inserting a NULL value breaks the hash and can lead to a bucket overflow.
In case of the collision counter, the value wasn't initialized, since it's not
needed for the purpose of checking collisions. As a result, it might contain
any garbage from the stack and in some rare cases the value was NULL.
Now the value is initilized.
|
|
|
|
|
|
To communicate with the Go program, Unit setup environment variable
named NXT_GO_PORTS with value contains Unit version, stream id to confirm
application is started, and Unit ports information. Go Unit package parses
this string and compares runtime version with compile time version. In case
of parse error or version mismatch, ListenAndServe() returns with the error.
|
|
|
|
As suggested by Igor Sysoev.
|
|
|
|
Passing unsafe.Pointers (void *) from Go to C is complicated by an attempt
to make such pointers less unsafe.
A straightforward optimization is to replace 'unsafe.Pointer' with 'uintptr'
(thanks to Xin Huang for the idea: https://stackoverflow.com/a/44826533 ).
As a result, request registry with mutex is gone.
|
|
Bug introduced in 585c8068a6d7.
|
|
All header files are copied to Go package sources. As the result,
package can be (re-)build when required.
This closes #23 issue on GitHub.
|
|
|
|
New parameter 'home' for python application allows to configure
application-specific virtualenv path.
This closes #15 issue on GitHub.
|
|
|
|
This closes #64 issue on GitHub.
|
|
This removal was missed the changeset 2aad6a5fac13.
|
|
|
|
|
|
|
|
CID 200496
CID 200494
CID 200490
CID 200489
CID 200483
CID 200482
CID 200472
CID 200465
|
|
|
|
Go request registration should be removed before C request memory freed.
C request address used as a key in Go map. Freed memory can be instantly
reused for other request and older request registration should removed at this
point to avoid collisions.
|
|
This closes #57 issue on GitHub.
|
|
|
|
|
|
Go package build was broken by change 365:28b2a468be43.
|
|
Previously, stored configuration wasn't reread on controller
process restart, which resulted in segmentation fault.
|
|
|
|
- Main process should be connected to all other processes.
- Controller should be connected to Router.
- Router should be connected to Controller and all Workers.
- Workers should be connected to Router worker thread ports only.
This filtering helps to avoid unnecessary communication and various errors
during massive application workers stop / restart.
|
|
"All problems in computer science can be
solved by another level of indirection"
Butler Lampson
Completion handlers for application response buffers executed after
sending the data to client. Application worker can be stopped right
after send response buffers to router. Worker stop causes removal
of all data structures for the worker.
To prevent shared memory segment unmap, need to count the number of
buffers which uses it. So instead of direct reference to shared
memory, need to reference to intermediate 'handler' structure with
use counter and pointer to shared memory.
|
|
Two different router threads may send different requests to single
application worker. In this case shared memory fds from worker
to router will be send over 2 different router ports. These fds
will be received and processed by different threads in any order.
This patch made possible to add incoming shared memory segments in
arbitrary order. Additionally, array and memory pool are no longer
used to store segments because of pool's single threaded nature.
Custom array-like structure nxt_port_mmaps_t introduced.
|
|
This allows to use shared memory to communicate with main process.
This patch changes shared memory segment format and breaks compatibility
with older modules.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|