Opened 14 years ago
Closed 14 years ago
#8686 closed defect (duplicate)
HTTPError 414 Request-URI Too Large
Reported by: | falkb | Owned by: | Joachim Hoessler |
---|---|---|---|
Priority: | normal | Component: | EstimationToolsPlugin |
Severity: | normal | Keywords: | |
Cc: | osimons | Trac Release: | 0.12 |
Description
My Trac project logging is growing with these errors:
2011-04-08 08:32:46,602 Trac[main] ERROR: Internal Server Error: Traceback (most recent call last): File "build\bdist.win32\egg\trac\web\main.py", line 511, in _dispatch_request dispatcher.dispatch(req) File "build\bdist.win32\egg\trac\web\main.py", line 237, in dispatch resp = chosen_handler.process_request(req) File "build\bdist.win32\egg\estimationtools\utils.py", line 74, in process_request chart = opener.open(url.encode('utf-8')) File "D:\BITNAM~1.2\apache2\bin\lib\urllib2.py", line 387, in open response = meth(req, response) File "D:\BITNAM~1.2\apache2\bin\lib\urllib2.py", line 498, in http_response 'http', request, response, code, msg, hdrs) File "D:\BITNAM~1.2\apache2\bin\lib\urllib2.py", line 425, in error return self._call_chain(*args) File "D:\BITNAM~1.2\apache2\bin\lib\urllib2.py", line 360, in _call_chain result = func(*args) File "D:\BITNAM~1.2\apache2\bin\lib\urllib2.py", line 506, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 414: Request-URI Too Large
Nevertheless, the burndown graph is shown on the web page like in the attached image.
The web page source code is:
<image src="/XXXXXXXX/estimationtools/chart?data=chxt%3Dx%252Cx%252Cy%26chco%3Dff9900%252Cffddaa%26chd%3Dt%253A0.00%252C1.10%252C2.20%252C3.30%252C4.40%252C5.49%252C6.59%252C7.69%252C8.79%252C9.89%252C10.99%252C12.09%252C13.19%252C14.29%252C15.38%252C16.48%252C17.58%252C18.68%252C19.78%252C20.88%252C21.98%252C23.08%252C24.18%252C25.27%252C26.37%252C27.47%252C28.57%252C29.67%252C30.77%252C31.87%252C32.97%252C34.07%252C35.16%252C36.26%252C37.36%252C38.46%252C39.56%252C40.66%252C41.76%252C42.86%252C43.96%252C45.05%252C46.15%252C47.25%252C48.35%252C49.45%252C50.55%252C51.65%252C52.75%252C53.85%252C54.95%252C56.04%252C57.14%252C58.24%252C59.34%252C60.44%252C61.54%252C62.64%252C63.74%252C64.84%252C65.93%252C67.03%252C68.13%252C69.23%252C70.33%252C71.43%252C72.53%252C73.63%252C74.73%252C75.82%252C76.92%252C78.02%252C79.12%252C80.22%252C81.32%252C82.42%252C83.52%252C84.62%252C85.71%252C86.81%252C87.91%252C89.01%252C90.11%252C91.21%252C92.31%252C93.41%252C94.51%252C95.60%252C96.70%252C97.80%252C98.90%252C100.00%257C0.00%252C0.00%252C0.00%252C0.00%252C0.00%252C0.00%252C0.00%252C0.00%252C0.00%252C0.00%252C0.00%252C0.00%252C0.00%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C11.59%252C13.04%252C13.04%252C13.04%252C13.04%252C13.04%252C13.04%252C13.04%252C15.94%252C15.94%252C15.94%252C15.94%252C15.94%252C75.36%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%252C100.00%26chf%3Dc%252Cs%252Cffffff00%257Cbg%252Cs%252C00000000%26chxr%3D2%252C0%252C69.0%26chg%3D100.0%252C100.0%252C1%252C0%26chm%3DR%252Cccccccaa%252C0%252C0.00%252C0.03%257CR%252Cccccccaa%252C0%252C0.08%252C0.11%257CR%252Cccccccaa%252C0%252C0.15%252C0.19%257CR%252Cccccccaa%252C0%252C0.23%252C0.26%257CR%252Cccccccaa%252C0%252C0.31%252C0.34%257CR%252Cccccccaa%252C0%252C0.39%252C0.42%257CR%252Cccccccaa%252C0%252C0.46%252C0.49%257CR%252Cccccccaa%252C0%252C0.54%252C0.57%257CR%252Cccccccaa%252C0%252C0.62%252C0.65%257CR%252Cccccccaa%252C0%252C0.69%252C0.72%257CR%252Cccccccaa%252C0%252C0.77%252C0.80%257CR%252Cccccccaa%252C0%252C0.85%252C0.88%257CR%252Cccccccaa%252C0%252C0.92%252C0.96%26chs%3D800x200%26cht%3Dlxy%26chtt%3DP2-DS1%2B-%2Bv2.0.1%26chxl%3D0%253A%257C7%257C8%257C9%257C10%257C11%257C12%257C13%257C14%257C15%257C16%257C17%257C18%257C19%257C20%257C21%257C22%257C23%257C24%257C25%257C26%257C27%257C28%257C29%257C30%257C31%257C1%257C2%257C3%257C4%257C5%257C6%257C7%257C8%257C9%257C10%257C11%257C12%257C13%257C14%257C15%257C16%257C17%257C18%257C19%257C20%257C21%257C22%257C23%257C24%257C25%257C26%257C27%257C28%257C1%257C2%257C3%257C4%257C5%257C6%257C7%257C8%257C9%257C10%257C11%257C12%257C13%257C14%257C15%257C16%257C17%257C18%257C19%257C20%257C21%257C22%257C23%257C24%257C25%257C26%257C27%257C28%257C29%257C30%257C31%257C1%257C2%257C3%257C4%257C5%257C6%257C7%257C8%257C1%253A%257C1%252F2011%257C4%252F2011" alt="Burndown Chart (server)"></image>
Attachments (2)
Change History (9)
Changed 14 years ago by
Attachment: | burndownGraph#8686.JPG added |
---|
Changed 14 years ago by
Attachment: | burndownGraph8686.JPG added |
---|
comment:1 Changed 14 years ago by
Trac Release: | 0.11 → 0.12 |
---|
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
Could you try this patch, please:
-
estimationtools/utils.py
diff --git a/estimationtools/utils.py b/estimationtools/utils.py
a b 66 66 req.perm.require('TICKET_VIEW') 67 67 url = 'http://chart.apis.google.com/chart?%s' % req.args.get('data', '') 68 68 self.log.debug("Fetching chart using url: %s" % repr(url)) 69 chart = urllib2.urlopen(url.encode('utf-8')) 69 opener = urllib2.build_opener() 70 chart_req = urllib2.Request('GET', url.encode('utf-8'), '', {}) 71 chart = opener.open(chart_req) 72 #chart = urllib2.urlopen(url.encode('utf-8')) 70 73 for header, value in chart.headers.items(): 71 74 req.send_header(header, value) 72 75 req.write(chart.read())
-> See if making a new opener each time helps (instead of using some shared unknown implementation buried inside urllib2
).
comment:5 Changed 14 years ago by
Oops. Patch bugs... Now I've actually tested the patch, so at least verified to work for regular chart requests. See if it help with your reported bug too:
-
estimationtools/utils.py
diff --git a/estimationtools/utils.py b/estimationtools/utils.py
a b 66 66 req.perm.require('TICKET_VIEW') 67 67 url = 'http://chart.apis.google.com/chart?%s' % req.args.get('data', '') 68 68 self.log.debug("Fetching chart using url: %s" % repr(url)) 69 chart = urllib2.urlopen(url.encode('utf-8')) 69 opener = urllib2.build_opener(urllib2.HTTPHandler()) 70 chart_req = urllib2.Request(url.encode('utf-8')) 71 chart = opener.open(chart_req) 70 72 for header, value in chart.headers.items(): 71 73 req.send_header(header, value) 72 74 req.write(chart.read())
comment:6 Changed 14 years ago by
I was wrong and looked at another chart. The right chart that causes the error exceeds the limit of 50 days. So this ticket is a duplicate of #5555 and could be closed. Sorry for any trouble.
comment:7 Changed 14 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Oki. Follow #5555 though, adding a patch there.
Now I found out the error does not happen when I just show the single milestone web page https://172.20.7.11/XXXXXXXX/milestone/XX-XXX%20-%20XX, but it does happen when I go to the roadmap page https://172.20.7.11/XXXXXXXX/roadmap where also other charts are displayed.
So it looks like urllib2 sends the data of all charts of the roadmap page in one request which leads to that "URI Too Large" error, so only in that case the error happens. And not if I only have 1 chart on a certain milestone pages.