Attachments were working and then stopped

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
jrainbolt
Posts: 2
Joined: 08 Nov 2022, 21:25

Attachments were working and then stopped

Post by jrainbolt »

When our users attempt to add a note with an attachment, we get this error message:
APPLICATION ERROR #504

No file was uploaded. Please go back and Choose a file before pressing Upload.

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
Users can still add notes and create new issues, provided they do not contain attachments.

Up to this point, our users have uploaded 84301 attachments to Mantis. The error started occurring today at 11:12 AM Central. I contacted everyone that has access to the virtual machine hosting Mantis, and everyone that has admin access to the site, to see if they changed anything, and they said no.

What I have tried:
  • Checked disk space on VM (80GB free)
  • Restarted the site in IIS
  • Rebooted the VM
  • Checked Windows event log for errors
  • Tried different browsers (Chrome, Firefox, Edge)
  • Enabled verbose logging with $g_log_level = LOG_DATABASE | LOG_WEBSERVICE;, attempted to upload an attachment multiple times, and then checked the Mantis log for errors. All I saw were SQL queries, no errors.
  • Checked MySQL log for errors
  • Attempted to check if mantis_bug_file_table exceeded any table, row size, or index size limits (InnoDB engine).
  • Deleted a large attachment and then uploaded an attachment smaller than the one I deleted. I received the same error. The row count in mantis_bug_file_table went down by 1, and still remains that way.
  • Checked IIS log for errors
  • Checked max file size in IIS (28.6 MB)
  • Checked max file size in Mantis (4.8 MB)
  • Checked max file size in PHP (2 MB)
  • Checked CPU, network, memory usage on the VM for the past 24 hours for anomalies
Our mantis_bug_file_table is 10.2 GB large. All of the bugtracker tables combined sum to 10.6 GB.

Attached a screenshot of our admin/check/index.php. I believe the three errors about collation were there before this issue started happening.

In short, uploading attachments was working, and now it's not. I would appreciate any troubleshooting tips you can provide.
Attachments
admin_check.png
admin_check.png (56.79 KiB) Viewed 1078 times
Mantis: 2.22.1
PHP: 7.4.13
SQL: MySQL 8.0.26
OS: Windows Server 2016 Datacenter
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Attachments were working and then stopped

Post by cas »

add the following line to your config/config_inc.php and try again:
$g_show_detailed_errors = ON;
Now you will see some more info which can help to analyse the issue.
jrainbolt
Posts: 2
Joined: 08 Nov 2022, 21:25

Re: Attachments were working and then stopped

Post by jrainbolt »

We found a solution. We needed to give IIS_IUSRS permission to write to C:\Windows\Temp. Previously it only had "Read" and "List folder contents".

I do not understand the timing of the issue. We have been able to upload attachments for years, and suddenly, yesterday, we lost that ability. Our security logs show that nobody logged in to the VM around the time that the problem started. I thought maybe a Windows update changed the permissions, but we have taken no Windows updates in the last month. We host Mantis on an Azure VM, so it is possible that Azure forced a change on us.

Thank you, cas, for your suggestion to enable detailed error messages. It led us down a path that eventually led to a solution.
Mantis: 2.22.1
PHP: 7.4.13
SQL: MySQL 8.0.26
OS: Windows Server 2016 Datacenter
Post Reply