Forums | Mahara Community
invalid file extensions hanging up server
19 October 2009, 19:32
I think the following is happening on our site: Whe students try to upload .bmp files or other non-allowed files, the system seems to slow down to a point so that time out errors occur for everyone. I am not 100% sure that this is happening but we have seen on several occasions that everything seems fine and then all of a sudden the entire site is down for a couple of minutes. I checked the server log but don't see anything relevant (or at least I think so) I think its related to this uploading thing.
In another CMS (Drupal) I have seen that if a user tries to upload a non-allowed file type, there will be an immideate message to the user saying the file is not alowed, without the system even trying to do the upload. I am wondering if something like that would be usefull here as well. For example, students wanting to retrieve photos from Facebook save the files as .bmp and then try to upload and then they site and wait for quite a while. Of course they need to learn what they can upload but it bugs me that it seems to affect the entire site. I could be wrong.
19 October 2009, 19:46
Unless you are running a very old version of Mahara there should be no non-allowed file types any more; you can upload anything, although I don't think .bmp files will be detected as images when they're uploaded.
One thing that slows down the file uploads a lot is the clamav virus detection. If you have that enabled in site options, you could try turning it off and see if that fixes the problem.
20 October 2009, 19:10
.bmps are actually detected as images, from looking at the code - if imagemagick is installed, that is.
When did we remove the filetype checking? 1.1? Or is that only on master?
22 October 2009, 1:26
Thanks for the replies.
imagemagick is installed and I am using 1.1.6. ClamAV is off.
I will tinker with time-out and file max and memory allocation stuff in php settings. I am using CPanel on a VPS with 1 GIG of burst ram. Too little for 20 students clicking around?
Makes me think about bringing up this idea: Any chance to have this: Some sort of file upload status functionality such as the PECL uploadprogress library?
22 October 2009, 2:20
1G should be fine - you'd be seeing the site go slow, rather than file uploads dying.
I think someone has filed a feature request about upload progress - definitely something for us to do