When does the glitch 5 minute timer start - after last request, after data streaming finishes or something else?

Hi!

I’ve been working on a project for parsing and interpreting genome sequencing data (.BAM files) for risk factors of Alzheimer’s disease, and am using Glitch for hosting because the no-storage limit for the /tmp folder is amazing!

Unfortunately, the entire sequence of a human’s genome (including intron regions) is approximately ~5GB. To stay under the memory limit, my project uses busboy on the backend, and streams/pipes the file in 1514 byte blocks (about 10/second) from the client. Project link below.

This takes longer than 5 minutes to fully receive a genomic sequence file.

Additionally, once a file is received, it must be indexed and read by samtools - a genomic parsing library. I’ve got this working on glitch, however, due to memory and CPU limits, this can sometimes take a while. My project doesn’t send a response or close the connection through res.writeHead(code, { Connection: "close" }) until this is completed, but, this can take ~3-6 minutes.

When does the 5-minute timer for project ‘inactivity’ on glitch start?

Is it

  • after the inital HTTP (POST) request is recieved?
  • after the client stops sending data?
  • after the connection to the client is closed / response is sent?

Thank you!

I thought it was after the response is fully sent, but I can’t find any references about this. long lived websockets seem to work fine though, if you want to look into that

1 Like