How to Read HAR Files, GC Logs and SQLite Databases
Three files turn up in every investigation: the HAR export, the GC log and the .db file. How to capture each, what the numbers mean, and the findings that settle most cases.
By Redbison Dev · · Updated · 10 min read

A support ticket arrives with three attachments: a HAR export of the slow page, a GC log from the suffering JVM, and the app's .db file. Each one holds the answer to a different question, and each one is sensitive enough that uploading it to a random viewer site is a mistake. This guide covers how to capture all three, what the numbers inside actually mean, and the findings that settle most cases, using the HAR File Analyzer, Java GC Log Analyzer and SQLite File Inspector, which parse everything in your browser so the file never leaves your machine.
Why these three files deserve the same caution as a password
A HAR records every request of a session: full URLs, headers, cookies, and often the bodies, enough to replay a logged-in session. Chrome now exports a "sanitized" HAR by default that strips Cookie, Set-Cookie and Authorization headers, and keeps the full export behind a settings opt-in, which tells you how seriously its own makers take the risk. A GC log is the mildest of the three, but an SQLite file is the data itself: someone's messages, orders or browsing history in one copyable file.
The practical rule: analyze these files where they already are. All three tools here run as local JavaScript, transmit nothing, and work offline once loaded, the same design as the heap and thread dump analyzers they sit beside. Binary payloads and archives get the same treatment in the binary format decoding guide, and artifacts that are programs rather than logs, executables, WebAssembly modules, pprof profiles and fonts, in reading binary files without running them.
The HAR: find the bytes and the waits
Capture one in DevTools: Network panel, exercise the page, Export HAR. Drop the file into the HAR File Analyzer and read the verdict line. For the 11-request capture in our test suite, it prints: 11 requests, 321 KiB transferred (808 KiB decoded), 1.3s span, 1 from cache, and third-party: 4 requests, 208 KiB (65% of transfer).
Each phrase earns its place. Transferred against decoded is the compression story: this page ships 808 KiB of content in 321 KiB of wire bytes. The third-party share is the part of the page you cannot fix in your own code: here one CDN image, a font host and an analytics endpoint carry 65% of the transfer. And the findings below the totals name the individual culprits: a 500 from /api/recommendations that also happens to be the slowest request at 422 ms, a 301 redirect burning a round trip, and an 11.5 KiB stylesheet served without compression, caught because its transfer size roughly equals its decoded size.
The phase table answers "where did the time go" across all requests: blocked (queuing), dns, connect, ssl, send, wait (server think time), receive. In the example, wait dominates at 1355 ms of the roughly 2000 phase-milliseconds, which points at slow endpoints rather than network setup. Two HAR subtleties matter when reading it. First, a timing of -1 means the phase did not apply, the HAR draft's own wording; a request on a reused connection has no dns or connect, and the analyzer excludes those values rather than counting zeros. Second, the draft states that ssl time is also included in connect for backward compatibility, so those two rows overlap and must not be added.
The GC log: percentiles, throughput and the sawtooth
Turn on logging with -Xlog:gc:file=gc.log (JDK 9 and later; Oracle's conversion table maps the old -XX:+PrintGCDetails to -Xlog:gc*) or -Xloggc:gc.log -XX:+PrintGCDetails on JDK 8, and leave it on: the cost is negligible and every memory incident needs it. The GC logging guide covers rotation, turning logging on in a running JVM, and the JDK 8 flags that now stop JDK 17 from starting. Drop the log into the Java GC Log Analyzer.
The 5-second G1 log in our test suite, an OpenJDK 17 allocation stress test with two planted System.gc() calls, reads back as: 63 collections (2 full) over 5.0s, throughput 98.43%, pauses p50 0.7 ms, p90 2.9 ms, p99 5.9 ms, max 5.9 ms, allocation roughly 6.6 GiB/s against a peak heap of 40.0 MiB.
Three readings turn those numbers into decisions:
- Throughput against G1's own target. G1's throughput dial is
-XX:GCTimeRatio, default 12, which per Oracle's tuning guide targets about 8% of time in GC (the share is 1/(1+ratio)). 98.43% throughput means 1.57% paused, comfortably inside design. A G1 service living below roughly 92% is outside it, and the fix is usually heap size or allocation rate, not pause flags. The analyzer refuses to print throughput for logs spanning under 5 seconds, because pause-over-wall measured across a blink is noise. - p99, not the average. Half these pauses are under 0.7 ms, the worst is 5.9 ms, eight times longer. A request that lands inside a pause experiences all of it, so the percentile to hold against a latency budget is p99.
- Full GCs by cause. Two Full GCs in five seconds would normally scream "heap too small"; the by-type table shows both are
Pause Full (System.gc()), which is a code smell with a one-flag mitigation (-XX:+ExplicitGCInvokesConcurrent), not a sizing problem. Genuine pressure announces itself earlier: Oracle's guide notes Full GCs are typically preceded by collections tagged (Evacuation Failure), the log line people grep as "To-space exhausted".
The heap-over-time chart is the leak detector: used heap sawing up and dropping back to the same floor is healthy; a floor that climbs collection after collection is a leak or a live set outgrowing the heap. When the floor climbs, the next file to capture is a heap dump, and the dump analysis guide picks up from there. One honesty note on old logs: JDK 8 Full GC lines that carry a [Metaspace: ...] block between the heap figures and the seconds are not yet recognised, so Full GC counts on detailed JDK 8 logs can run low; the unified format has no such gap.
The SQLite file: what is in here, and can I trust the counts
Drop any .sqlite or .db file into the SQLite File Inspector and the 100-byte header answers the first questions: page size, encoding, journal mode and which SQLite version last wrote the file, all read from the documented offsets of the file format. For the database in our test suite, written by sqlite3 3.51.0, it reports 18 pages of 4.0 KiB, UTF-8, and then the part estimates cannot give you: exact row counts from walking each table's B-tree, orders 1,500 rows in 7 pages and users 500 rows in 5 pages, 2,000 rows in all. The test suite asserts those counts equal SELECT COUNT(*) from sqlite3 itself on the same file.
Exactness forces two honest caveats, and the tool prints both:
- WAL mode. In write-ahead-log mode a commit lands in the
-walsidecar and the main file only catches up at a checkpoint (by default once the WAL reaches 1000 pages). A file copied without its sidecar is missing its newest commits, and SQLite's documentation warns the separation can even corrupt. The inspector flags WAL mode on every count, and recognises a dropped-walfile by its magic bytes instead of misreading it. - WITHOUT ROWID tables. The file format stores them as index B-trees, a different page layout from the table walk. The inspector lists them with their SQL and marks them "not counted" rather than printing a zero that looks like an answer.
The freelist figure settles the "why does my database never shrink" ticket. Deleting rows moves pages to a freelist for reuse; the file keeps its size. In our WAL-mode fixture, deleting 160 of 200 log rows left 82 freelist pages, 41.0 KiB of the 53.5 KiB file holding nothing. VACUUM rebuilds the file and returns that space, at the cost of up to twice the file size in temporary disk while it copies.
Tools for this job
- HAR File Analyzer: drop a DevTools network export; totals, third-party share, phases, slowest, heaviest, errors and compression findings.
- PCAP File Inspector: when the question is packets rather than requests; protocol breakdown, top talkers and unanswered SYNs from a .pcap, covered in the capture triage guide.
- Java GC Log Analyzer: paste a JDK 9+ or JDK 8 GC log; pause percentiles, throughput, allocation rate, heap chart and warnings.
- SQLite File Inspector: drop a .sqlite or .db file; header facts, schema with SQL, exact row counts and freelist waste.
- Online Diff Tool: diff two text summaries, before and after a fix or a deploy; the changed lines are the story, as the text diff guide shows for other noisy outputs.
- Java Heap Dump Analyzer: when the GC chart's floor keeps climbing, the .hprof says which class is growing.
Frequently asked questions
Which of these files should I ask a user for?
Match the complaint. Page slow or broken in the browser: a sanitized HAR. A Java service pausing or burning CPU in GC: the GC log, which should already be rotating on disk. Data missing or an app misbehaving around its storage: the SQLite file with its -wal sidecar. The HAR and the database carry personal data, so ask for the minimum and analyze it locally.
Can I automate these checks in CI?
The parsing logic behind all three pages is plain TypeScript with pinned tests, and each page's text summary is stable, diffable output. For CI-grade budgets on web performance specifically, Lighthouse CI and WebPageTest read HARs natively; the browser tools here are built for the investigation moment, not the pipeline.
What sizes can the browser handle?
A HAR and a GC log are text and parse in one pass; tens of megabytes are comfortable. An SQLite file is read whole into memory, so hundreds of megabytes work on a desktop while multi-gigabyte files depend on the machine. None of the three uploads anything, so the only limit is your own RAM.
Do I need the paid or desktop versions of anything?
No. DevTools exports the HAR, the JVM writes its own log, and the database is already a file. The analysis layer here is free and browser-only; the heavyweight desktop tools (Eclipse MAT for heap ownership, a SQL console for querying rows) start where these summaries end, with a hypothesis instead of a blank page.
Sources and further reading
- HTTP Archive (HAR) format, W3C Web Performance Working Group. The abandoned 1.2 draft that remains the de facto spec: timings, -1 semantics, ssl within connect.
- Network features reference, Chrome for Developers. Exporting HARs and what the sanitized export strips.
- Garbage-First (G1) Garbage Collector, Oracle. G1 phases, evacuation failure and humongous objects.
- Garbage-First Garbage Collector Tuning, Oracle. GCTimeRatio, Full GC causes and their remedies.
- The java Command, Oracle. -Xlog syntax and the legacy GC flag conversion table.
- Database File Format, SQLite. The header, B-tree page types and WITHOUT ROWID storage.
- Write-Ahead Logging, SQLite. The -wal sidecar and checkpointing.
- VACUUM, SQLite. What rebuilding reclaims and what it costs.
More Debugging
Every tool in the Debugging section, free and in your browser.