# error during simulation

**URL:** <https://community.gatling.io/t/error-during-simulation/1399>\
**Category:** Gatling (Open-Source)\
**Created:** [September 10, 2014, 2:11pm UTC](https://community.gatling.io/t/error-during-simulation/1399 "2014-09-10T14:11:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrei\_Proskurin](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@Andrei\_Proskurin](https://community.gatling.io/u/Andrei_Proskurin)\
**Post date:** [September 10, 2014, 2:11pm UTC](https://community.gatling.io/t/error-during-simulation/1399/1 "2014-09-10T14:11:00Z")

</div>

When I run my simulation with 20-50 users everything is ok. Whenever I put it 100+ users I get the following error:  
[ERROR] [09/10/2014 17:03:59.350]  
[GatlingSystem-akka.actor.default-dispatcher-5]  
[ActorSystem(GatlingSystem)] exception while executing timer task  
java.lang.IllegalStateException: cannot enqueue after timer shutdown  
What can be the reason?

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [September 10, 2014, 2:13pm UTC](https://community.gatling.io/t/error-during-simulation/1399/2 "2014-09-10T14:13:01Z")

</div>

Version?  
Do you use something like a max duration?

---

<div class="post-metadata">

**Author:** ![Andrei\_Proskurin](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@Andrei\_Proskurin](https://community.gatling.io/u/Andrei_Proskurin)\
**Post date:** [September 10, 2014, 2:15pm UTC](https://community.gatling.io/t/error-during-simulation/1399/3 "2014-09-10T14:15:04Z")

</div>

I am using Gatling.2.0.0-RC4, my simulation setup is:  
scenarioName.inject(rampUsers(100) over 300).protocols(protocolName)

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [September 10, 2014, 2:17pm UTC](https://community.gatling.io/t/error-during-simulation/1399/4 "2014-09-10T14:17:00Z")

</div>

What’s the full stacktrace, please?

---

<div class="post-metadata">

**Author:** ![Andrei\_Proskurin](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@Andrei\_Proskurin](https://community.gatling.io/u/Andrei_Proskurin)\
**Post date:** [September 10, 2014, 2:18pm UTC](https://community.gatling.io/t/error-during-simulation/1399/5 "2014-09-10T14:18:38Z")

</div>

[ERROR] [09/10/2014 16:55:05.387] [GatlingSystem-akka.actor.default-dispatcher-9] [ActorSystem(GatlingSystem)] exception while executing timer task  
java.lang.IllegalStateException: cannot enqueue after timer shutdown  
at akka.actor.LightArrayRevolverScheduler.scheduleOnce(Scheduler.scala:277)  
at akka.actor.Scheduler$class.scheduleOnce(Scheduler.scala:117)  
at akka.actor.LightArrayRevolverScheduler.scheduleOnce(Scheduler.scala:182)  
at io.gatling.core.scenario.Scenario.io$gatling$core$scenario$Scenario$$batchSchedule$1(Scenario.scala:70)  
at io.gatling.core.scenario.Scenario$$anonfun$io$gatling$core$scenario$Scenario$$batchSchedule$1$2.apply$mcV$sp(Scenario.scala:78)  
at akka.actor.Scheduler$$anon$7.run(Scheduler.scala:117)  
at akka.actor.LightArrayRevolverScheduler$TaskHolder.run(Scheduler.scala:476)  
at akka.actor.LightArrayRevolverScheduler$$anonfun$close$1.apply(Scheduler.scala:282)  
at akka.actor.LightArrayRevolverScheduler$$anonfun$close$1.apply(Scheduler.scala:281)  
at scala.collection.Iterator$class.foreach(Iterator.scala:727)  
at scala.collection.AbstractIterator.foreach(Iterator.scala:1157)  
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)  
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)  
at akka.actor.LightArrayRevolverScheduler.close(Scheduler.scala:280)  
at akka.actor.ActorSystemImpl.stopScheduler(ActorSystem.scala:687)  
Exception in thread “main” java.lang.IllegalStateException: Feeder is now empty, stopping engine  
at io.gatling.core.action.SingletonFeed.feed(SingletonFeed.scala:60)  
at io.gatling.core.action.SingletonFeed$$anonfun$receive$1.applyOrElse(SingletonFeed.scala:28)  
at akka.actor.Actor$class.aroundReceive(Actor.scala:465)  
at io.gatling.core.akka.BaseActor.aroundReceive(BaseActor.scala:23)  
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516)  
at akka.actor.ActorCell.invoke(ActorCell.scala:487)  
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238)  
at akka.dispatch.Mailbox.run(Mailbox.scala:220)  
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)  
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)  
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)  
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)  
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)  
at akka.actor.ActorSystemImpl$$anonfun$liftedTree2$1$1.apply$mcV$sp(ActorSystem.scala:616)  
at akka.actor.ActorSystemImpl$$anonfun$liftedTree2$1$1.apply(ActorSystem.scala:616)  
at akka.actor.ActorSystemImpl$$anonfun$liftedTree2$1$1.apply(ActorSystem.scala:616)  
at akka.actor.ActorSystemImpl$$anon$3.run(ActorSystem.scala:640)  
at akka.actor.ActorSystemImpl$TerminationCallbacks$$anonfun$run$1.runNext$1(ActorSystem.scala:807)  
at akka.actor.ActorSystemImpl$TerminationCallbacks$$anonfun$run$1.apply$mcV$sp(ActorSystem.scala:810)  
at akka.actor.ActorSystemImpl$TerminationCallbacks$$anonfun$run$1.apply(ActorSystem.scala:803)  
at akka.actor.ActorSyl$TerminationCallbacks$$anonfun$run$1.apply(ActorSystem.scala:803)  
at akka.util.ReentrantGuard.withGuard(LockUtil.scala:15)  
at akka.actor.ActorSystemImpl$TerminationCallbacks.run(ActorSystem.scala:803)  
at akka.actor.ActorSystemImpl$$anonfun$terminationCallbacks$1.apply(ActorSystem.scala:637)  
at akka.actor.ActorSystemImpl$$anonfun$terminationCallbacks$1.apply(ActorSystem.scala:637)  
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)  
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67)  
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82)  
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)  
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)  
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)  
at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58)  
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:41)  
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)  
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)  
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)  
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)  
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [September 10, 2014, 2:21pm UTC](https://community.gatling.io/t/error-during-simulation/1399/6 "2014-09-10T14:21:43Z")

</div>

OK, so your real problem is the second stacktrace:  
Exception in thread “main” java.lang.IllegalStateException: Feeder is now empty, stopping engine

Your feeder is empty =\> Gatling stops the Akka ActorSystem =\> Some other part of Gatling might still be in the process of injecting users.

You’re probably using a CSV file with less lines than you’re injecting virtual users. And as the default strategy is queue…

Please have a look at the Feeder documentation.

---

<div class="post-metadata">

**Author:** ![Andrei\_Proskurin](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@Andrei\_Proskurin](https://community.gatling.io/u/Andrei_Proskurin)\
**Post date:** [September 10, 2014, 2:26pm UTC](https://community.gatling.io/t/error-during-simulation/1399/7 "2014-09-10T14:26:26Z")

</div>

I do understand this part:

"Every time a virtual user reaches this step, it will pop a record out of the Feeder, which will be injected into the user’s Session, resulting in a new Session instance.

If the Feeder can’t produce enough records, Gatling will complain about it and your simulation will stop."

But what do I do if the csv file is a password file and I do not want records to be deleted because there are only 15 passwords that I need to use for users(user can require different password - its random)?

---

<div class="post-metadata">

**Author:** ![Excilys](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@Excilys](https://community.gatling.io/u/Excilys)\
**Post date:** [September 10, 2014, 2:30pm UTC](https://community.gatling.io/t/error-during-simulation/1399/8 "2014-09-10T14:30:18Z")

</div>

use another strategy than the default one: random, circular

---

<div class="post-metadata">

**Author:** ![Andrei\_Proskurin](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@Andrei\_Proskurin](https://community.gatling.io/u/Andrei_Proskurin)\
**Post date:** [September 10, 2014, 2:43pm UTC](https://community.gatling.io/t/error-during-simulation/1399/9 "2014-09-10T14:43:35Z")

</div>

Thanks a lot! Circular works for me. Now I know a little more about Gatlling.
