[tor-bugs] #13574 [Onionoo]: Tweak memory usage of hourly cronjob
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Oct 27 08:32:26 UTC 2014
#13574: Tweak memory usage of hourly cronjob
-----------------------------+--------------------------
Reporter: karsten | Owner:
Type: enhancement | Status: needs_review
Priority: normal | Milestone:
Component: Onionoo | Version:
Resolution: | Keywords:
Actual Points: | Parent ID:
Points: |
-----------------------------+--------------------------
Comment (by karsten):
Here's another stack trace:
{{{
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2367)
at
java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
at
java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
at
java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
at java.lang.StringBuffer.append(StringBuffer.java:237)
at java.io.StringWriter.write(StringWriter.java:101)
at
org.apache.commons.lang.StringEscapeUtils.escapeJavaStyleString(StringEscapeUtils.java:196)
at
org.apache.commons.lang.StringEscapeUtils.escapeJavaStyleString(StringEscapeUtils.java:164)
at
org.apache.commons.lang.StringEscapeUtils.escapeJavaScript(StringEscapeUtils.java:131)
at
org.torproject.onionoo.docs.DetailsDocument.escapeJSON(DetailsDocument.java:21)
at
org.torproject.onionoo.docs.DetailsDocument.setContact(DetailsDocument.java:267)
at
org.torproject.onionoo.writer.DetailsDocumentWriter.updateRelayDetailsFiles(DetailsDocumentWriter.java:158)
at
org.torproject.onionoo.writer.DetailsDocumentWriter.writeDocuments(DetailsDocumentWriter.java:72)
at
org.torproject.onionoo.writer.DocumentWriterRunner.writeDocuments(DocumentWriterRunner.java:29)
at org.torproject.onionoo.cron.Main.main(Main.java:55)
}}}
Added another commit to that branch that avoids `String.replaceAll()` and
uses `StringUtils.replace()` instead. Trying out that patch right now.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13574#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list