# java.nio.BufferOverflowException

**URL:** <https://forum.inductiveautomation.com/t/java-nio-bufferoverflowexception/71764>\
**Category:** General Discussion\
**Tags:** ignition81\
**Created:** [March 29, 2023, 11:00am UTC](https://forum.inductiveautomation.com/t/java-nio-bufferoverflowexception/71764 "2023-03-29T11:00:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincent.devillers](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vincent.devillers](https://forum.inductiveautomation.com/u/vincent.devillers)\
**Post date:** [March 29, 2023, 11:00am UTC](https://forum.inductiveautomation.com/t/java-nio-bufferoverflowexception/71764/1 "2023-03-29T11:00:16Z")

</div>

We have an Ignition (8.1.18) server where every two days a buffer overflow exception is happening. Once the buffer overflow occures, all execution of scripts are halted. Simply editing a script and saving it (or using EAM to push the tags/project), seems to temporarily resolve the problem. Has anyone a suggestion how to find the cause for this? Traceback (most recent call last):  
File "\<TimerScript:RSS\_new/update\_group\_command\_schedule @1,000ms \>", line 2, in   
File "module:group\_command", line 495, in update\_group\_command\_schedule  
java.nio.BufferOverflowException  
at java.base/java.nio.HeapByteBuffer.put(Unknown Source)  
at org.python.core.io.BufferedWriter.write(BufferedWriter.java:41)  
at org.python.core.io.BinaryIOWrapper.write(BinaryIOWrapper.java:118)  
at org.python.core.io.TextIOWrapper.write(TextIOWrapper.java:260)  
at org.python.core.PyFile.file\_write(PyFile.java:456)  
at org.python.core.PyFile.write(PyFile.java:460)  
at org.python.core.StdoutWrapper.printToFile(StdoutWrapper.java:117)  
at org.python.core.StdoutWrapper.print(StdoutWrapper.java:186)  
at org.python.core.StdoutWrapper.println(StdoutWrapper.java:272)  
at org.python.core.Py.println(Py.java:1905)  
at org.python.pycode.\_pyx26915.update\_group\_command\_schedule$8(module:group\_command:497)  
at org.python.pycode.\_pyx26915.call\_function(module:group\_command)  
at org.python.core.PyTableCode.call(PyTableCode.java:173)  
at org.python.core.PyBaseCode.call(PyBaseCode.java:119)  
at org.python.core.PyFunction. **call** (PyFunction.java:406)  
at org.python.pycode.\_pyx62.f$0(\<TimerScript:RSS\_new/update\_group\_command\_schedule @1,000ms \>:2)  
at org.python.pycode.\_pyx62.call\_function(\<TimerScript:RSS\_new/update\_group\_command\_schedule @1,000ms \>)  
at org.python.core.PyTableCode.call(PyTableCode.java:173)  
at org.python.core.PyCode.call(PyCode.java:18)  
at org.python.core.Py.runCode(Py.java:1687)  
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:796)  
at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:819)  
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:748)  
at com.inductiveautomation.ignition.gateway.project.ProjectScriptLifecycle$TrackingProjectScriptManager.runCode(ProjectScriptLifecycle.java:800)  
at com.inductiveautomation.ignition.common.script.TimerScriptTask.run(TimerScriptTask.java:90)  
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)  
at java.base/java.util.concurrent.FutureTask.runAndReset(Unknown Source)  
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)  
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)  
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)  
at java.base/java.lang.Thread.run(Unknown Source)  
java.nio.BufferOverflowException: java.nio.BufferOverflowException

8.1.18 (b2022061518)  
Azul Systems, Inc. 11.0.15

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/d/5dfacf2ef4181efea8ec4da28da6a5742ff12350.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/e/ee104536f637dd096bd997e7920a28248dfb8956.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/8/f865418c2f0e81cfe9b8d2e19db39e3da24b2f6c.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/3/a357c625d6b90f61605fa441400aab3b7bb9ffb9.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/b/ab581d59efcb86565f7f278782edc8d05e9822dc.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 29, 2023, 12:45pm UTC](https://forum.inductiveautomation.com/t/java-nio-bufferoverflowexception/71764/2 "2023-03-29T12:45:07Z")

</div>

> [@vincent.devillers](#):
>
> \<TimerScript:RSS\_new/update\_group\_command\_schedule @1,000ms \>

Show your code for this event. (Remember to use the "preformatted text" in the forum's comment editor. Please also edit your OP and fix the pasted backtrace likewise.)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [March 29, 2023, 4:02pm UTC](https://forum.inductiveautomation.com/t/java-nio-bufferoverflowexception/71764/3 "2023-03-29T16:02:10Z")

</div>

Root cause is probably _massive_ flooding of print statements in that timer. Maybe inside a loop inadvertently.

---

<div class="post-metadata">

**Author:** ![vincent.devillers](https://avatars.discourse-cdn.com/v4/letter/v/5daacb/32.png) [@vincent.devillers](https://forum.inductiveautomation.com/u/vincent.devillers)\
**Post date:** [March 31, 2023, 8:46am UTC](https://forum.inductiveautomation.com/t/java-nio-bufferoverflowexception/71764/4 "2023-03-31T08:46:27Z")

</div>

Yes, it is also my assumption. It was very likely caused by timer started script having print statements for debugging, so I've removed al print statements from the said scripts. We will see if it stabilises
