#8622: Exceptions in UploadHandler cause hang
-------------------------------------------+--------------------------------
          Reporter:  kmtracey              |         Owner:  nobody
            Status:  new                   |     Milestone:  1.0   
         Component:  File uploads/storage  |       Version:  SVN   
        Resolution:                        |      Keywords:        
             Stage:  Unreviewed            |     Has_patch:  0     
        Needs_docs:  0                     |   Needs_tests:  0     
Needs_better_patch:  0                     |  
-------------------------------------------+--------------------------------
Changes (by kmtracey):

  * needs_better_patch:  => 0
  * needs_docs:  => 0
  * summary:  Windows TemporaryFile hangs on write when disk is full =>
              Exceptions in UploadHandler cause hang
  * needs_tests:  => 0
  * milestone:  => 1.0

Comment:

 Further investigation shows the write is not hanging, it is raising an
 exception.  If I change the code to:

 {{{
         def write(self, s):
             print 'in TemporaryFile(nt), about to call self.file.write(s)'
             try:
                 x = self.file.write(s)
             except Exception, e:
                 print 'Caught exception on self.file.write(s): %s' %
 str(e)
                 raise
             print 'in TemporaryFile(nt), back from self.file.write(s)'
             return x

 }}}

 and try to upload to a disk with not enough free space, I see:

 {{{
 in TemporaryFile(nt), about to call self.file.write(s)
 Caught exception on self.file.write(s): [Errno 28] No space left on device
 }}}

 in my dev server console output.  No error is reflected anywhere I can
 see, there is no further console output and the browser page that
 initiated the upload is stuck at "Loading....".

 Changing milestone to 1.0 since this appears to be a more far-reaching
 problem than I initially thought and someone should probably take a look
 at it sooner rather than later.

 Also exceptions in upload handlers causing requests to hang has been
 reported here:  http://groups.google.com/group/django-
 users/browse_thread/thread/b2fb9bf7fe1d47f9#

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8622#comment:1>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to