Memory faults stop Jira in two opposite ways: too little heap and it dies slowly with OutOfMemoryError - too much requested and the Java machine cannot even be born. The settings live in one file.
Jira runs inside a Java virtual machine, and that machine reserves its working memory - the heap - up front, using two numbers: a minimum and a maximum, written in setenv.bat. When those numbers no longer fit your server or your Jira's size, startup fails. The trap is that both directions of wrong look similar from the browser: Jira is simply down. This page teaches you to tell them apart from the logs, and to change heap deliberately, within what your server's RAM can honestly give.
Raising the heap when the real problem is 'heap too big to reserve' makes things worse, and lowering it when Jira is genuinely starving does the same. Spend two minutes identifying your fault before touching a single number.
OutOfMemoryError - that is a heap that is too small for the workloadCould not create the Java Virtual Machine or an error about reserving memory, the requested heap is too large for the free RAMOn Windows, Jira's heap lives in setenv.bat in the bin folder of the install directory, in two variables: JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY. Values look like 1024m or 2048m. If Jira runs as a service, the same values may also be recorded in the service configuration - Atlassian provides a configuration tool in the bin folder, and both places must agree.
setenv.bat before editing - one line back is your undosetenv.bat and find the two memory lines; note the current valuesJVM_MAXIMUM_MEMORY in steps (for example from 1024m to 2048m), not in one giant leapThe heap is a reservation from the same RAM that Windows, the database and everything else on the machine also need. Giving Jira every gigabyte guarantees the machine swaps to disk - which is slower than a small heap ever was. A practical rule: on a shared server, Jira's maximum heap should leave clear room for the operating system and the database; on a dedicated Jira server it can take the larger share, but never all of it.
Honesty matters here: OutOfMemoryError on a Jira that ran fine for a year usually means growth - more users, more issues, heavier plugins - or a plugin leaking memory. Raising the heap buys time, and buying time is legitimate. But if the errors return within days at the new size, the cause is a leak or a workload the server cannot carry, and the real fixes are finding the offending plugin, or giving Jira a bigger server - not another blind increase.
setenv.bat.The full Jira startup repair, step by step, with the exact screens and log lines shown live.
▶️ Watch Full VideoIn setenv.bat, inside the bin folder of the Jira install directory - the JVM_MINIMUM_MEMORY and JVM_MAXIMUM_MEMORY lines. If Jira runs as a Windows service, confirm the same values in the service configuration using the Jira configuration tool in the same bin folder. Restart the service afterwards; memory settings are only read at startup.
Because the JVM reserves the maximum heap as one continuous block at startup, and it could not get it - either the free RAM is smaller than the number you set, or a 32-bit Java is installed, which caps out far below modern heap sizes. Lower the maximum to a value the machine can honestly spare, and confirm Jira is using a 64-bit JDK.
Watch the interval. A growing Jira that runs out after weeks, then months at a larger heap, is simply growing. A Jira that starts failing again within days of each increase, at roughly the same point after each restart, is leaking - most often through a plugin. At that point, stop raising the heap and investigate plugins and recent changes instead.