Add GC every thousand server calls to avoid stack corruption.