Skip to content

Upload files failing after approximately 50 files #1376

@abdelali-hamza

Description

@abdelali-hamza

Describe the bug

When uploading multiple files (approximately 50 ) to a table via the API or manually, the upload process starts failing with HTTPConnectionPool(host='127.0.0.1', port=3000): Read timed out. (read timeout=10) errors. This issue occurs consistently after processing around 50 files, regardless of whether the uploads are performed via a script or manually. The server appears to handle the initial uploads successfully but begins timing out on subsequent requests.

Config for the upload

Using s3 uploads

the file is uploaded to the bucket successfully , i can find it when i browse data

Screenshots

2025-03-10 05:19:26,471 - ERROR - Failed to upload file for record recbhV4sVwe5zvLAdvO: HTTPConnectionPool(host='127.0.0.1', port=3000): Read timed out. (read timeout=10)

logs of the container :

{
"level": 30,
"time": 1741585801380,
"pid": 6,
"hostname": "304fad8d44ea",
"name": "teable",
"req": {
"id": "a0e28219853287547357c4ad1293a7c9",
"method": "POST",
"url": "/api/table/tblHXuC0uTgITgxVEYO/record/recBF5jpyCvPdSQpO8g/fldMZLtpoIonS5S4Yiz/uploadAttachment",
"query": {},
"params": {
"0": "api/table/tblHXuC0uTgITgxVEYO/record/recBF5jpyCvPdSQpO8g/fldMZLtpoIonS5S4Yiz/uploadAttachment"
},
"remoteAddress": "::ffff:192.168.65.1",
"remotePort": 47868
},
"context": "AttachmentsService",
"spanId": "239164258fc5138f",
"traceId": "a0e28219853287547357c4ad1293a7c9",
"msg": "Uploading file: HHLmyvL1GFlC.pdf, size: 186853 bytes, mimetype: application/pdf"
}

{
"level": 30,
"time": 1741585831334,
"pid": 6,
"hostname": "304fad8d44ea",
"name": "teable",
"req": {
"id": "a0e28219853287547357c4ad1293a7c9",
"method": "POST",
"url": "/api/table/tblHXuC0uTgITgxVEYO/record/recBF5jpyCvPdSQpO8g/fldMZLtpoIonS5S4Yiz/uploadAttachment",
"query": {},
"params": {
"0": "api/table/tblHXuC0uTgITgxVEYO/record/recBF5jpyCvPdSQpO8g/fldMZLtpoIonS5S4Yiz/uploadAttachment"
},
"remoteAddress": "::ffff:192.168.65.1",
"remotePort": 47868
},
"res": {
"statusCode": null
},
"responseTime": 30004,
"spanId": "239164258fc5138f",
"traceId": "a0e28219853287547357c4ad1293a7c9",
"msg": "request aborted"
}

when i try to upload , it stays in this step

Image

it seems like the request http://localhost:3000/api/attachments/notify/QbzzQEJQIYNr?filename=C_Diapo.pdf is stuck

Temporary Solution

docker compose down
docker compose up -d

Additional context

The issue persists even with manual uploads, suggesting a server-side limitation rather than a client-side script problem.
The backend code (AttachmentsService) and thresholdConfig do not impose an explicit limit on the number of uploads, only file size limits (maxAttachmentUploadSize and maxOpenapiAttachmentUploadSize, both set to Infinity by default).
Logs indicate successful record creation but fail during attachment upload with a 10-second timeout (set in the script and possibly reflected in server behavior).
Server logs or configuration details (e.g., Prisma connection pool, NestJS timeout settings) might provide further insight.
Example log snippet:
2025-03-10 05:19:26,471 - ERROR - Failed to upload file for record recbhV4sVwe5zvLAdvO: HTTPConnectionPool(host='127.0.0.1', port=3000): Read timed out. (read timeout=10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions