1454 Commits

Author SHA1 Message Date
Joris Vink
a868ff2b25 wrap accesslog calls in !KORE_NO_HTTP. 2018-12-22 09:41:55 +01:00
Joris Vink
642779094f prep 3.2.1 2018-12-22 09:34:50 +01:00
Joris Vink
be8fe84f1e Merge branch 'master' into 3.0.0-releng 2018-12-22 09:34:30 +01:00
Joris Vink
9aa0e95643 Rework accesslog handling.
Move away from the parent constantly hitting the disk for every
accesslog the workers are sending.

The workers will now write their own accesslogs to shared
memory before the parent will pick those up. The parent
will flush them to disk once every second or if they grow
larger then 1MB.

This removes the heavy penalty for having access logs
turned on when you are dealing with a large volume
of requests.
2018-12-22 09:25:00 +01:00
Joris Vink
0d6a188b01 close fd if we're a directory in filemap. 2018-12-17 16:22:36 +01:00
Joris Vink
61b385ae11 do not set CONN_CLOSE_EMPTY for 1.0 until we reply. 2018-11-30 22:12:43 +01:00
Joris Vink
cf2e158773 3.2.0 2018-11-30 21:36:00 +01:00
Joris Vink
be453a4d86 we're here. 3.2.0-release 2018-11-29 21:27:13 +01:00
Joris Vink
462b178a7e Merge branch 'master' into 3.0.0-releng 2018-11-29 21:27:06 +01:00
Joris Vink
4f1acf7060 more intmax_t 2018-11-29 21:25:20 +01:00
Joris Vink
400521073c better format string 2018-11-29 21:24:08 +01:00
Joris Vink
e97396366c don't go examples clean 2018-11-29 21:18:15 +01:00
Joris Vink
418c08166a use releng things 2018-11-29 21:13:43 +01:00
Joris Vink
af45936447 add releng-build-examples target for myself 2018-11-29 21:13:34 +01:00
Joris Vink
ed7b1019fc add /usr/local/include 2018-11-29 21:13:19 +01:00
Joris Vink
fe52e3f4e0 update comment 2018-11-29 21:04:49 +01:00
Joris Vink
59ce048ce3 add a Makefile to build all examples. 2018-11-29 21:04:14 +01:00
Joris Vink
ccaab50410 add /usr/local/lib to tasks example. 2018-11-29 21:03:22 +01:00
Joris Vink
5da99c8860 make sse example great again 2018-11-29 21:01:08 +01:00
Joris Vink
b163d849a6 remove ktunnel example, its too old. 2018-11-29 20:45:26 +01:00
Joris Vink
91f420d94a people keep subbing to non-mailing-list mails. 2018-11-29 15:52:40 +01:00
Joris Vink
195c690c6d bump 2018-11-29 15:38:07 +01:00
Joris Vink
348138e747 Merge branch 'master' into 3.0.0-releng 2018-11-29 15:38:00 +01:00
Joris Vink
272d659f1c we use certain things from sys/param.h 2018-11-29 10:31:14 +01:00
Joris Vink
ce3b60b8c8 keep a reference around for tracer. 2018-11-29 09:53:26 +01:00
Joris Vink
d9f543ef5b Allow user-supplied tracer callback. 2018-11-29 09:51:24 +01:00
Joris Vink
b400fdcd9f include sys/param.h in python.c 2018-11-29 09:11:31 +01:00
Joris Vink
b0e1007458 bump 2018-11-28 14:27:54 +01:00
Joris Vink
a6b0cca7f3 Merge branch 'master' into 3.0.0-releng 2018-11-28 14:27:31 +01:00
Joris Vink
fd1ab5879d KODEV_OUTPUT tells kodev the outdir of the binary.
eg:

$ env KODEV_OUTPUT=/tmp kodev build

will place the resulting binary under /tmp/<binary>
2018-11-28 14:24:42 +01:00
Joris Vink
8dd075e71c style 2018-11-28 14:22:27 +01:00
Joris Vink
e3efeb9465 Move assets.h into object_dir. 2018-11-28 14:19:32 +01:00
Joris Vink
34829d8592 Add OPENSSL_PATH environment variable. 2018-11-28 13:54:38 +01:00
Joris Vink
c431c2bf72 Add support to obtain peer certificate from Python
This will return the DER encoded bytes representing the peer certificate.
2018-11-28 11:28:07 +01:00
Joris Vink
6d78ae04b4 Add async socket example. 2018-11-23 22:34:09 +01:00
Joris Vink
a030a6fd38 update README 2018-11-22 15:24:08 +01:00
Joris Vink
c74c1f781d Add python-async example. 2018-11-22 15:23:44 +01:00
Joris Vink
8b1a5add4b update 2018-11-22 13:05:02 +01:00
Joris Vink
2d8874dd2a change accept threshold default to 16. 2018-11-16 11:37:09 +01:00
Joris Vink
4e70636269 Reduce accept lock accept lockout time to 100ms. 2018-11-16 11:35:53 +01:00
Joris Vink
5c8efde841 allow foo.method symbols in python.
this way you can create page handlers that reside inside
of other objects.

eg:

static / restapi.index
2018-11-16 11:07:21 +01:00
Joris Vink
baafa4897e Add -q flag.
If specified Kore will run quietly and only log important messages.
2018-11-15 16:01:37 +01:00
Joris Vink
cb482d8e8f Always use http_response_stream() in req.response.
Keep around the python bytes object while we stream the contents
of it out over the wire. This avoids an entire copy of the data.
2018-11-14 10:03:32 +01:00
Joris Vink
966eaf8f7a Add a kore_python_preinit() hook.
This is called before the python initialization is completed
and allows developers to inject their own built-in methods.
2018-11-12 09:01:05 +01:00
Joris Vink
3925ba60ad don't call close() no underlying socket. 2018-11-12 09:00:36 +01:00
Joris Vink
4cc9e216bb Don't call close() on the python socket on dealloc 2018-11-06 16:54:26 +01:00
Joris Vink
2dd66586ff several python improvements.
- add kore.time() as equivalent for kore_time_ms().
- call waitpid() until no more children are available for reaping otherwise
  we risk missing a process if several die at the same time and only one
  SIGCHLD is delivered to us.
- drain a RECV socket operation if eof is set but no exception was given.
2018-10-30 20:28:27 +01:00
Joris Vink
5456f2e1d5 save/restore coro_running in pygather_op_dealloc(). 2018-10-30 12:37:30 +01:00
Joris Vink
062c80c1ac start enforcing a mininum number of elms in pools. 2018-10-30 10:41:49 +01:00
Joris Vink
71c145932c grow kore_pools at a slower rate.
Before we just doubled in size the second we exhausted a pool instead
of doing a more controlled expansion.

Now we will expand at 25% of the initial elm count whenever we need to.

Will help with memory pressure in certain scenarios.
2018-10-30 10:36:18 +01:00