Problems fetching correlation reports should be logged as warning not error



7 years ago
7 years ago


(Reporter: rhelmer, Assigned: rhelmer)


Firefox Tracking Flags

(Not tracked)




7 years ago
Now that we push PHP app logs to Arecibo (bug 675985), we get ~300 errors per topcrash page, when the product/version on that page does not have valid correlation reports.

We're working on integrating correlation reports directly into Socorro, but in the meantime let's just turn down the logging to "warning" (we only send "error" to Arecibo).


7 years ago
Assignee: nobody → rhelmer
Target Milestone: --- → 2.3.4

Comment 1

7 years ago
lonnen, brandon - r?

I am not entirely pleased with this approach. The problem is that gzopen/fopen don't throw exceptions, but they honor set_error_handler.

Based on comments in the ErrorHandler class it was once used for getJsonZ but this no longer appears to be the case (presumably this was moved to the middleware and uses something other than fopen/gzopen now).

This patch checks the error string for "HTTP/1.1 404 NOT FOUND" and logs warning in that case, error otherwise.

The only alternative I can think of (besides switching the whole thing to another lib like curl) is to do an @get_headers() right before the fopen/gzopen, and abort if there is a 404. The requires an extra HTTP request per correlation report, which normally would not bother me much but as I mentioned we do 300 of these per topcrash report :(

Comment 2

7 years ago
It's not pleasant, but its Kohana-ish (given how logging works, yeah?). Warnings seems sufficient for this, since this problem is already well handled.

Comment 3

7 years ago
Commits pushed to
bug 704379 - log as warning not error for correlation report if HTTP fetch failure is due to 404
Merge pull request #171 from rhelmer/bug704379-correlation-warning

bug 704379 - log as warning not error for correlation report if HTTP fet...


7 years ago
Last Resolved: 7 years ago
Resolution: --- → FIXED

Comment 4

7 years ago
Thanks, seems to work on crash-stats-dev!

One interesting thing - now that these are out of the way, I see we're sometimes getting some other interesting entries on crash-stats-dev:

fopen( failed to open stream: operation failed /data/socorro/htdocs/application/libraries/Correlation.php line 112

gzopen(): Failed to enable crypto /data/socorro/htdocs/application/libraries/Correlation.php line 112

gzopen(): SSL: connection timeout /data/socorro/htdocs/application/libraries/Correlation.php line 112

I think we're just making *way* too many requests... in fact something very funky is going on in this code, because I just counted *1800* 404 warnings logged for a single topcrasher page load (!)

I've filed bug 704410 to track that.
Component: Socorro → General
Product: Webtools → Socorro
You need to log in before you can comment on or make changes to this bug.