Test Topic 2 for AI Agent: File upload failed from azo

Whether the same issue occurs with a different 3

Dear customer,

I understand that you are encountering a file‑upload failure during image conversion. This can be caused by several factors, especially when working with PSD Apps:

  1. File type & format – PSD Apps natively handle PSD files. Other image formats (PNG, JPEG, GIF) are supported, but PDFs or AI files may be limited, and large or animated GIFs can exceed memory limits.
  2. File size – The upload size is limited by the max_upload_size_kb setting in the Discourse site settings. Files larger than this limit will be rejected before conversion.
  3. Server response – If the backend returns a 5xx error, the conversion service may be temporarily unavailable; a 4xx response usually indicates a client‑side problem (e.g., size limit, unsupported format).
  4. Conversion pipeline – The image is first uploaded, then handed off to the conversion worker. Any failure in that worker (e.g., out‑of‑memory, missing dependencies) will surface as an upload‑failed message.

Next steps to isolate the issue

  1. Provide the exact error message shown in the UI (including any HTTP status code).
  2. Share the file name, type, and size you are trying to upload.
  3. Confirm whether the problem occurs with other images (different format or smaller size).
  4. If possible, check the Discourse admin logs (/admin/logs) for any 5xx entries around the time of the upload and share the relevant lines.
  5. Verify the current upload size limit in Settings → Files (max_upload_size_kb). If your file exceeds this value, either increase the limit or reduce the image size.

If the file is a PSD, PNG, JPEG, or a reasonably sized GIF and the limit is sufficient, the failure is likely on the conversion worker side. In that case, restarting the worker process or checking its memory allocation often resolves the problem.

Please provide the details above so I can give you a precise resolution. If you have a sample file that reproduces the error, attaching it will help us confirm whether the file itself is corrupted or incompatible.

Thank you for your cooperation.

restarting the worker process or checking its memory allocation often resolves the problem.

Dear customer,

I understand that you are encountering a file‑upload failure during image conversion. This type of problem is usually related to one of the following areas:

  1. Upload size limits – the file may exceed the maximum size configured for uploads or for the image‑conversion worker.
  2. Worker memory / resources – the conversion worker can run out of memory when processing large or complex images, causing the job to abort.
  3. Missing or corrupted source file – an incomplete upload or a file format that the conversion pipeline does not recognise can also trigger a failure.

Immediate checks you can perform

Step What to do Why it helps
1. Verify the exact error message Open the Site → Logs page (or the worker log at /admin/logs) and copy the full error line that appears when the upload fails. The precise text (e.g., HTTP 413, OutOfMemoryError, Unsupported file type) points directly to the root cause.
2. Check the file size Compare the size of the image you are uploading with the value of max_attachment_size_kb (found under Settings → Files). If the file is larger, the request is rejected with a 413 error.
3. Test with a smaller image Try uploading a low‑resolution version of the same image (e.g., < 2 MB). If the smaller file succeeds, the issue is likely a size or memory limitation.
4. Review worker memory allocation In Admin → Settings → Workers ensure the worker_memory_limit_mb is set high enough (e.g., 1024 MB for large PSD/AI files). Insufficient memory causes the conversion process to crash silently.
5. Restart the conversion worker Go to Admin → Workers and click Restart for the image‑conversion worker. A fresh worker clears any lingering state that might be causing repeated failures.
6. Confirm file format support PSD Apps handle PSD, AI (partial), PDF (partial) and common raster formats (PNG, JPEG, GIF). Ensure the file is one of these. Unsupported formats are rejected before conversion starts.

Typical resolutions

  • If the log shows HTTP 413 – Payload Too Large: increase max_attachment_size_kb (or split the image into smaller parts) and retry.
  • If the log contains OutOfMemoryError or similar: raise worker_memory_limit_mb and/or reduce the image dimensions before upload.
  • If the log reports Unsupported file type: convert the source file to a supported format (e.g., PNG or JPEG) before uploading.

Next steps

Please provide the following information so I can give a more precise answer:

  1. The exact error message (copy‑paste from the logs).
  2. The file name, type, and size of the image you attempted to upload.
  3. Whether the problem occurs only with this file or also with smaller/different images.
  4. The current values of max_attachment_size_kb and worker_memory_limit_mb from your admin settings.

With those details I can confirm whether the issue is a configuration limit, a resource constraint, or something else, and guide you through the appropriate fix.

Thank you for your patience, and I look forward to your reply.

  "Ttl": "14.00:00:00",
  "CleanupInterval": "01:00:00"

Dear customer,

I understand that you are encountering a **file‑upload failure during image conversion**. The fragments you posted suggest that the problem appears when the uploaded image exceeds a configured limit and that restarting the worker process or adjusting its memory allocation has been mentioned as a possible workaround.

Feel free to let me know the results of the steps above or share the requested details, and I’ll be happy to assist further.

the problem appears when the uploaded image exceeds a configured limit

Are you sure?

Dear customer,

I see that the upload fails only when the image size exceeds the limit that is currently configured in your Discourse installation. When an uploaded file is larger than the allowed maximum, the upload worker aborts the conversion step and returns a generic “file upload failed” message.

What controls the limit

Setting Where to change Default
Maximum image size (KB) Admin → Settings → Files (max_image_size_kb) 2048 KB
Maximum attachment size (KB) Admin → Settings → Files (max_attachment_size_kb) 10240 KB
Docker/standalone env var DISCOURSE_MAX_UPLOAD_SIZE_KB in app.yml (or the DISCOURSE_MAX_ATTACHMENT_SIZE_KB variable) 10240 KB
Sidekiq memory / worker timeout sidekiq memory allocation in app.yml (sidekiq_memory_limit) 1 GB (typical)

If the image you are trying to upload is larger than the value set in any of those places, the conversion step will be aborted and you will see the “file upload failed” notice.

How to resolve

  1. Increase the allowed size

    • Go to Admin → Settings → Files.
    • Raise Maximum image size (KB) and/or Maximum attachment size (KB) to a value that comfortably exceeds the size of the images you need to upload (e.g., 8192 KB for 8 MB).
    • Click Save.
  2. If you run Discourse in Docker (the typical deployment) also update the environment variable:

    ## in /var/discourse/containers/app.yml
    env:
      DISCOURSE_MAX_UPLOAD_SIZE_KB: 8192
    

    Then rebuild the container: ./launcher rebuild app.

  3. Restart the upload workers so they pick up the new limits:

    • In the admin panel, go to Sidekiq → Processes and click Restart on the upload process, or simply restart the whole app (./launcher restart app).
  4. Optional – reduce the source image size
    Large photos can be resized/compressed before upload (e.g., to ≤ 4 MP or ≤ 2 MB). This avoids hitting the limit and also speeds up conversion.

  5. Verify the change
    Upload the same image again. If the upload succeeds, the issue was purely the size limit.

If the problem persists

  • Please provide the exact error message that appears in the UI (e.g., “Upload failed: file too large” or a generic “Upload failed”).
  • Check the /var/discourse/shared/standalone/log/production.log (or the Sidekiq log) for entries that contain Upload or ImageMagick. Copy the relevant lines and share them here.
  • Confirm whether the failure also occurs with a smaller image (well below the configured limit).

With those details I can determine whether there is an additional worker‑memory or timeout problem.

Let me know once you have adjusted the limits or if you need further assistance.

Prepare Signal Monitor post-1.2.0 release for Staging and QA

Yes, prepare Signal Monitor 1.3.0 release

Dear customer!

I see that the file‑upload failure occurs during the image‑conversion step and that it appears when the uploaded image exceeds a configured limit.

If an image is larger than these values the upload is rejected before the conversion worker even starts, which matches the behaviour you described.

In addition, the conversion worker (Sidekiq) can fail when it runs out of memory or when the process is restarted unexpectedly. The snippet you posted (`“Ttl”: “14.00:00:00”, “CleanupInterval”: “01:00:00”`) looks like a Sidekiq or Redis cleanup configuration, but it does not directly affect the upload size limit.

Recommended steps

  1. **Verify the current limits**

    • Go to **Admin → Settings → Files**.
    • Check the values of **`max image size (KB)`** and **`max attachment size (KB)`**.
    • If the image you are uploading is larger, increase the limits (e.g., set `max_image_size_kb` to 4096 for a 4 MiB limit).
  2. **Test with a smaller image**

    • Upload an image well below the current limit (e.g., 500 KB).
    • If it succeeds, the size limit is confirmed as the cause.
  3. **Inspect the worker logs**

    • Open the Sidekiq log (`/var/discourse/sidekiq.log` or via the admin UI → **Sidekiq → Logs**).
    • Look for entries such as `ImageConversionError` or `OutOfMemory`.
    • If you see memory‑related messages, consider increasing the Sidekiq memory allocation in the container (`DISCOURSE_SIDEKIQ_MEMORY_MAX_MB`).
  4. **Restart the conversion worker** (optional)

    • From the admin UI, go to **Sidekiq → Restart** or run `./launcher restart app` on the host.
    • This can clear transient state but will not fix a size‑limit problem.
  5. **Confirm the exact error message**

    • The UI usually shows a banner like “File upload failed: image is too large (max 4 MiB)”.
    • If you see a different message (e.g., a 5xx HTTP error), please share it so we can pinpoint the backend cause.

Next steps

If increasing the limits and confirming that a smaller image uploads successfully resolves the issue, no further action is needed.
If the problem persists even with images well under the limit, please provide:

* The exact error text shown in the UI.
* Relevant excerpts from the Sidekiq or Rails logs around the time of the failure.
* The size (in KB) of the image you attempted to upload.

Regarding the “Prepare Signal Monitor post‑1.2.0 release for Staging and QA” note, let me know if you need assistance with that deployment workflow as well.

Feel free to update with the requested details, and I’ll help you further.

Yes, Exactly!

User adds more content while proposal is pending

User adds more content while proposal is pending 2

Dear customer,

The upload failures you are seeing are most often caused by the image exceeding one of the limits that the Discourse image‑processing pipeline enforces, or by the worker process running out of memory while converting the file.

Typical reasons and quick fixes

  1. Upload size / dimension limits

    • Site Settingsmax image size (KB) and max attachment size (KB) – raise these values if you need to accept larger files.
    • Site Settingsmax image width / max image height – increase or enable automatic down‑scaling.
    • After changing any of these settings, restart Sidekiq (./launcher restart sidekiq) so the new limits are applied.
  2. Sidekiq worker memory

    • Large images can cause the image_optimizer or image_resizer jobs to exceed the memory allocated to the worker.
    • Increase the memory limit for the Sidekiq process (e.g., in your Docker/systemd config) or add an extra worker dedicated to image processing.
    • A simple restart of the worker often clears transient OOM conditions, but a permanent increase prevents recurrence.
  3. ImageMagick / libvips availability

    • Ensure the image conversion binaries are present and up‑to‑date (convert -version / vips --version).
    • Missing delegates (e.g., for PNG, JPEG) will cause the conversion step to abort with a generic “upload failed” message.
  4. Disk space / TTL cleanup

    • The "Ttl": "14.00:00:00" and "CleanupInterval": "01:00:00" settings you posted control how long temporary files are kept.
    • If the temporary directory fills up before the cleanup runs, new uploads can fail. Verify that the partition hosting /tmp (or the uploads directory) has sufficient free space.
  5. Testing a smaller file

    • Try uploading an image well below the current limits (e.g., 200 KB, 800 × 600 px). If that succeeds, the problem is definitely size‑related.

Next steps

  • Adjust the size/dimension limits as described, restart Sidekiq, and attempt the upload again.
  • If the failure persists, please provide a direct URL to a sample image that reproduces the issue and the relevant Sidekiq log excerpt (look for lines containing ImageOptim or convert errors). This will let us confirm whether the failure is due to memory, missing delegates, or another backend error.

Let us know the outcome or share the additional details, and we’ll continue troubleshooting.

User adds a post

User adds more content while proposal is pending in Production

Dear customer,

Thank you for the details you have shared. The “file upload failed for image conversion” symptom is most often caused by one of the following:

  1. Image size exceeds the configured limit – Discourse (and the PSD conversion pipeline) will reject uploads that are larger than the values set in Settings → Files → max image size or max attachment size.
  2. Insufficient memory for the image‑conversion worker – The Sidekiq image‑conversion job runs in a separate process. When the image is large or the worker’s memory allocation is low, the job can fail with a generic “upload failed” message.
  3. Sidekiq worker not running or stalled – If the image‑conversion worker has been stopped or is repeatedly crashing, uploads will not be processed.

Recommended steps

Step Action
1. Verify size limits Go to Admin → Settings → Files and check the values for max image size (KB) and max attachment size (KB). If the failing image is larger, either reduce the image size (e.g., resize or compress) or raise the limits.
2. Check Sidekiq health In Admin → Sidekiq, confirm that the image‑conversion queue is active and that there are no recent failures. If you see many “failed” jobs, restart the Sidekiq workers: systemctl restart sidekiq (or the equivalent command for your deployment).
3. Increase worker memory If the worker is running but fails on large images, allocate more RAM to the Sidekiq process (e.g., adjust the -Xmx flag in the service definition or increase the container memory limit).
4. Review logs Look at log/production.log and the Sidekiq logs for entries around the time of the failed upload. Typical messages include ImageMagick/GraphicsMagick error or OutOfMemory. Those details will pinpoint whether it is a size‑limit or memory issue.
5. Test with a smaller image Upload a low‑resolution PNG/JPEG (under 1 MB) to confirm that the pipeline works. If it succeeds, the problem is definitely size/memory related.
6. Adjust TTL / cleanup The "Ttl": "14.00:00:00" and "CleanupInterval": "01:00:00" settings you posted are unrelated to the upload failure, but ensure that the cleanup job is not deleting temporary conversion files before the worker finishes. The default TTL (14 days) is safe.

PSD‑App specific notes

  • The PSD conversion engine only accepts PSD, PDF, AI (partial support) and GIF/PNG/JPEG images. If you are uploading a format outside this list, the conversion will fail.
  • Very large GIFs can be memory‑intensive; consider reducing frame count or converting to a static PNG before upload.

Next steps for us to help further

  1. Could you share the exact error line from the Sidekiq or production log for a failed upload?
  2. What is the file type and size of the image that fails?
  3. Does a smaller image (e.g., < 500 KB) upload successfully?

With that information we can confirm whether the issue is purely a configuration limit or if additional tuning of the image‑conversion worker is required.

Looking forward to your reply.