Sen2cor 2.5 terminates "successfully" altough images are not finished

I run sen2cor in docker and it seems to run, but in about 50% of the runs, the resulting image is not really finished (I find a file called “.database.h5” in the image folders, instead of the *.jp2 images).

The logs read something like that:

Sentinel-2 Level 2A Processor (Sen2Cor). Version: 2.5.5, created: 2018.03.19, supporting Level-1C product version <= 14.5 started ...
Product version: 14.5. Operation mode: PDGS. Processing baseline: 02.06.
No resolution specified, will process all resolutions.
Progress[%]: 0.01 : PID-412, L2A_ProcessTile: processing with resolution 60 m, elapsed time[s]: 0.375, total: 0:00:02.723292
Progress[%]: 0.01 : PID-412, L2A_ProcessTile: start of pre processing, elapsed time[s]: 0.000, total: 0:00:02.723654
Progress[%]: 45.94 : PID-412, L2A_AtmCorr: end of rho retrieval step 2, elapsed time[s]: 91.238, total: 0:25:38.594467
Progress[%]: 45.94 : PID-412, L2A_ProcessTile: start of post processing, elapsed time[s]: 0.023, total: 0:25:38.617389
...
...
... 
Progress[%]: 59.26 : PID-412, L2A_AtmCorr: end of calculation terrain maps, elapsed time[s]: 46.345, total: 0:33:03.941653
Progress[%]: 59.26 : PID-412, L2A_AtmCorr: start of resampling visibility for 10 m resolution, elapsed time[s]: 0.001, total: 0:33:03.942594
Progress[%]: 59.43 : PID-412, L2A_AtmCorr: end of resampling visibility for 10 m resolution, elapsed time[s]: 5.514, total: 0:33:09.457011
Progress[%]: 59.81 : PID-412, L2A_AtmCorr: end of AOT retrieval at 550nm, elapsed time[s]: 12.866, total: 0:33:22.323010
Progress[%]: 59.81 : PID-412, L2A_AtmCorr: preparation of surface reflectance retrieval, elapsed time[s]: 0.000, total: 0:33:22.323437
Progress[%]: 60.09 : PID-412, L2A_AtmCorr: end of surface reflectance retrieval preparation, elapsed time[s]: 9.269, total: 0:33:31.592793
Progress[%]: 100.00 : Application terminated successfully.

So sen2cor tells me it finished successfully, when its clearly not finished. I know from the past that it usually goes up until 99% and not skip from 60% to 100%.

I suspect it might be some memory issue, but can anyone point me in the right direction? I at least expect some out of memory error or something if thats the case, not a “finished successfully”

EDIT: Since I saw that the solution sometimes was to not specify the --resolution parameter when calling sen2cor, thats what I am doing, but I still have this problem