2016/10/04 18:45:09 [error] 25391#0: *328 lua entry thread aborted: runtime error: table overflow
stack traceback:
coroutine 0:
[C]: in function 'cdef'
/home/ben/src/chickpea/serve_image.lua:89: in function </home/ben/src/chickpea/serve_image.lua:1>
I read somewhere that this is the C definitions being repeatedly loaded by each thread (i.e. each request) and thus leading to an internal table overflow.
My use of FFI is:
local ffi = require "ffi"
and an example of one of my cdefs is:
ffi.cdef [[
typedef int pid_t;
void *malloc(size_t sz);
void *realloc(void*ptr, size_t size);
void free(void *ptr);
int sprintf(char *str, const char *format, ...);
int printf(const char *format, ...);
..
Am I correct that this is a cdef-related overflow? And if so, what am I doing wrong. I do have a number of cdefs in different lua files. Should I consolidate them?
Thanks, Tim