change: would be better to control maximum event-size by lua.