I've never heard about synology before, @ruthpozuelo
And unfortunately my Flask apps were very simple. Therefore I haven't had much problem with Flask.
Have you tried to issue a lots of logging messages around the possible error in the code ?
CC @rye