For the sake of documentation, another good reason not to run in debug mode is that it causes Flask to create a second process to monitor changes to the file system. The eventlet greenthreads for periodic clean up and firewall update tasks end up running in both processes, breaking the synchronisation in the firewall module. If the periodic firewall update runs in the parent process at the same time as an introspection callback API is handled in the main process, the two can interact, and cause unexpected errors, leading to inspection failure.
For the sake of documentation, another good reason not to run in debug mode is that it causes Flask to create a second process to monitor changes to the file system. The eventlet greenthreads for periodic clean up and firewall update tasks end up running in both processes, breaking the synchronisation in the firewall module. If the periodic firewall update runs in the parent process at the same time as an introspection callback API is handled in the main process, the two can interact, and cause unexpected errors, leading to inspection failure.