Fog Creek Software
Discussion Board

Large e-mail attachments.

I'm having an issue with an e-mail containing a 1.1MB PDF that someone's e-mailed in (and a very short lead-in message).

It fails partway through the creation of the case. The
server is running on Windows 2000 Server with a MySQL
database. The next time that dispacho runs, it tries to
download the message from the server again and
continues to fail (ad infinitum).

Is the entire e-mail being dumped to the database
before the PDF is decoded and saved to the
FileUploads directory? I've tried upping the ASP time out,
but it seems to fail long before the 300s I've set for it
(perhaps 30s into it instead).

Any other thoughts?

Here's the relavent section of the dispacho log (minus
passwords, etc.):

Reading user,pass,server,port,url
Setting normal (non-secure) mode
Attempting to log in
Num Messages...
<font face="Arial" size=2>
<p>Microsoft OLE DB Provider for ODBC Drivers</font> <font face="Arial" size=2>error '80004005'</font>
<font face="Arial" size=2>[MySQL][ODBC 3.51 Driver][mysqld-3.23.54-max]Lost connection to MySQL server during query</font>
<font face="Arial" size=2>/bugs/CBug.asp</font><font face="Arial" size=2>, line 813</font>
Error: PublishMessageToURL returned False. ASP file did not return 'OK'

Sean Ennis
Monday, March 15, 2004

Did you check your MySQL settings?


Michael H. Pryor
Fog Creek Software
Monday, March 15, 2004

I've set the max_allowed_packet size in the my.ini file
as follows:
    set-variable = max_allowed_packet=50M
This doesn't seem to have solved the problem (the remaining options seem to be related entirely to the PHP/Unix version of Dispatcho).

If I try to enter a case with a 1MB of case text
(bugevent.s) through the web interface, the server's
load rises to 100% and stays there for 4-5 minutes
before the system abandons the attempt to add the
case. The case is not created either.

If I enter a case, through the web interface, with just a
little case text, and attach a 1MB file to it as it is being
created, it works fine. The file gets uploaded, and the
case gets created propperly.

Sean Ennis
Tuesday, March 16, 2004

Attachments in the web interface are unrelated to email attachments.  The web interface attachments are stored on disk.  Email messages are stored entirely in the database.

Check the s column in the BugEvent table.  Make sure its type is set to longtext.  If not, you can alter the table to change that column to longtext.

Michael H. Pryor
Fog Creek Software
Tuesday, March 16, 2004

The s column is definitely a longtext.

I did an experiment by swapping back to the original
Microsoft Access database temporarily.

Creating a new case with 1MB of text gives simmilar
results (i.e., the server goes to 100% for 4-5 minutes
and the fails - alhtough this time it gives an error/bug
subition page).

Pulling in mail through dispatcho seems to work correctly

Sean Ennis
Tuesday, March 16, 2004

I'd just like to clarify - the original problem is a 1.1MB email attachment using MySQL with FogBUGZ for Windows. Are you saying that with Access instead, this email attachment works?
Are you using a DSN with Access or typing the file path on the site page? Were you using DSN with MySQL? What version of MyODBC? Of MySQL?

Fog Creek Software
Tuesday, March 16, 2004


While I had
    set-variable = max_allowed_packet=50M
in my c:\WINNT\my.ini file, MySQL apparently was not reading the file.

I created a c:\my.cnf file and inserted the same line
in there, and that has solved the isssue.

Only <deity> knows why MySQL isn't getting it from the ini

Sean Ennis
Wednesday, March 17, 2004

*  Recent Topics

*  Fog Creek Home