HgWeb.cgi Hanging During Push

Jensen, Aaron ajensen at webmd.net
Wed Apr 25 23:57:13 UTC 2012


> With Apache, it'll end up in an error.log (not to be confused with access.log). In IIS, somewhere in the system event log.

I couldn't find anything in the system event, so I hacked hgweb.cgi to output stderr to a file:

     import os
     errlog = "C:/inetpub/logs/httperr.%d.log" % os.getpid()
     sys.stderr = open(errlog, "w")
     sys.stderr.write("Writing to standard error.\n")
     sys.stderr.flush()

I had to add the sys.stderr.flush() because the process that hangs never gets to a point where stderr is written out. 

It looks like its hanging waiting for the repo lock to release (approximately line 589 of wireproto.py): 

	finally:
		lock.release() # <- here
	return pushres(r)


     <:> Aaron




More information about the Mercurial mailing list