Lucee instances crashing on Windows EC2 when running multiple CommandBox servers (JVM memory pressure)

Hello everyone,
I’m facing stability issues while running multiple Lucee applications using CommandBox on a Windows EC2 instance, and I’d like guidance on best practices.

Environment

  • OS: Windows EC2
  • RAM: 16 GB (tested also with higher RAM)
  • Lucee running via CommandBox
  • Lucee version: 5.4(LTS)
  • Total applications: 6
  • Setup: One Lucee instance per application (6 JVMs)
  • IIS used as a reverse proxy
  • PostgreSQL + PgAdmin running on the same EC2
  • Development environment (very low traffic: ~1000–1300 requests/day)

Issue

Even after explicitly configuring JVM heap sizes via server.json (using -Xms / -Xmx), the java.exe processes are being terminated automatically by Windows under memory pressure. This happens intermittently, especially during restarts or when multiple Lucee instances start together.

Increasing RAM helps temporarily, but the issue reappears. This makes the setup unreliable for development.

What we’ve tried

  • Explicit JVM heap configuration per app (avoiding auto heap)
  • Reducing heap sizes
  • Increasing EC2 RAM
  • Ensuring page file is enabled
  • Staggered server startup

Despite this, crashes still occur when running multiple JVMs on Windows.

Question?

What is the recommended approach for running multiple Lucee applications on a single Windows EC2 instance using CommandBox?

Did you really mean to create this dupe today of your post from a few days ago? Lucee instances crashing on Windows EC2 when running multiple CommandBox servers (JVM memory pressure)

If it was a mistake, note that you can delete this one. Otherwise, can you clarify why you’d not want the discussion to continue there?

Since we got spammed a while back, first posts require approval, i think someone else might have approved the second post (I think they retried)?

1 Like

Thanks, and I guess time will tell. :slight_smile: