You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by "wangchy0927 (via GitHub)" <gi...@apache.org> on 2023/04/24 06:08:20 UTC

[GitHub] [jmeter] wangchy0927 opened a new issue, #5816: An OOM occurred when uploading the file after executing tens of millions

wangchy0927 opened a new issue, #5816:
URL: https://github.com/apache/jmeter/issues/5816

   ### Expected behavior
   
   _No response_
   
   ### Actual behavior
   
   _No response_
   
   ### Steps to reproduce the problem
   
   1、BeanShell PreProcessor
   ```
   String zipPath = JmeterMain.createNewFile();
   vars.put("zip",zipPath);
   ```
   this file  about 1kb
   
   2、HTTP Request
   ![image](https://user-images.githubusercontent.com/3906620/233912355-6cafae07-5ac0-4aac-8c58-5fcd42c9199c.png)
   
   
   
   3、After executing tens of millions,OOM
   ![image](https://user-images.githubusercontent.com/3906620/233912547-f9025401-7a0c-45b2-971a-56affb82eed8.png)
   
   ### JMeter Version
   
   5.2.1
   
   ### Java Version
   
   java version "1.8.0_191"
   
   ### OS Version
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] milamberspace commented on issue #5816: An OOM occurred when uploading the file after executing tens of millions

Posted by "milamberspace (via GitHub)" <gi...@apache.org>.
milamberspace commented on issue #5816:
URL: https://github.com/apache/jmeter/issues/5816#issuecomment-1519638762

   How many virtual user have you in your script?
   What is the value for the heap Jave (-Xmx param) in jmeter.bat, default value?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] FSchumacher commented on issue #5816: An OOM occurred when uploading the file after executing tens of millions

Posted by "FSchumacher (via GitHub)" <gi...@apache.org>.
FSchumacher commented on issue #5816:
URL: https://github.com/apache/jmeter/issues/5816#issuecomment-1528726298

   > > Please tell us, what you do in `JmeterMain#createNewFile`. If you are registering files via `FileServer`, you have to make sure to release them, once they are not needed anymore. Otherwise you might explode your heap, as your memory dump shows.
   > 
   > `set HEAP=-Xms4g -Xmx4g -XX:MaxMetaspaceSize=256m`
   > 
   > I registering files via` java.io.FileInputStream`, Not using any Jmeter methods 。Last night i use `fileServer.closeFiles();` to release is ok now, I guess there was a problem with Jmeter uploading the byte stream. The file in the store before the upload started, but there was no automatic release after the upload ended
   > 
   > ![image](https://user-images.githubusercontent.com/3906620/234151330-923bf1f5-406b-4e71-bcd6-ea918c4dd7af.png)
   
   FileServer is meant for sharing files between threads and was designed to handle a *small* number of files. At the time, it was created a few thousand threads was the maximum you could dream of. Multiply that by a few files per thread (it was mainly used for CSV dataset configs, which there are normally not that many per test) and you get a low 10.000 number of files. 
   Your use case with millions of files is not a use case, it was thought for. So either clean up regularly the files and keep the numbers low (in FileServer), or use other means to handle your files. 
   Know, that each open filehandle will consume memory. If you don't need it open, close it.
   
   All in all, I read your comment, as you have solved your problems with heap consumption, so I close this issue. Feel free to reopen it, if you still have questions about this. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] wangchy0927 commented on issue #5816: An OOM occurred when uploading the file after executing tens of millions

Posted by "wangchy0927 (via GitHub)" <gi...@apache.org>.
wangchy0927 commented on issue #5816:
URL: https://github.com/apache/jmeter/issues/5816#issuecomment-1522971502

   > How many virtual user have you in your script? What is the value for the heap Java (-Xmx param) in jmeter.bat, default value?
   
   set HEAP=-Xms4g -Xmx4g -XX:MaxMetaspaceSize=256m


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] wangchy0927 commented on issue #5816: An OOM occurred when uploading the file after executing tens of millions

Posted by "wangchy0927 (via GitHub)" <gi...@apache.org>.
wangchy0927 commented on issue #5816:
URL: https://github.com/apache/jmeter/issues/5816#issuecomment-1522971132

   > set HEAP=-Xms4g -Xmx4g -XX:MaxMetaspaceSize=256m
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] FSchumacher commented on issue #5816: An OOM occurred when uploading the file after executing tens of millions

Posted by "FSchumacher (via GitHub)" <gi...@apache.org>.
FSchumacher commented on issue #5816:
URL: https://github.com/apache/jmeter/issues/5816#issuecomment-1519645529

   Please tell us, what you do in `JmeterMain#createNewFile`.
   If you are registering files via `FileServer`, you have to make sure to release them, once they are not needed anymore. Otherwise you might explode your heap, as your memory dump shows.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] FSchumacher closed issue #5816: An OOM occurred when uploading the file after executing tens of millions

Posted by "FSchumacher (via GitHub)" <gi...@apache.org>.
FSchumacher closed issue #5816: An OOM occurred when uploading the file after executing tens of millions
URL: https://github.com/apache/jmeter/issues/5816


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [jmeter] wangchy0927 commented on issue #5816: An OOM occurred when uploading the file after executing tens of millions

Posted by "wangchy0927 (via GitHub)" <gi...@apache.org>.
wangchy0927 commented on issue #5816:
URL: https://github.com/apache/jmeter/issues/5816#issuecomment-1521026982

   > Please tell us, what you do in `JmeterMain#createNewFile`. If you are registering files via `FileServer`, you have to make sure to release them, once they are not needed anymore. Otherwise you might explode your heap, as your memory dump shows.
   
   `set HEAP=-Xms4g -Xmx4g -XX:MaxMetaspaceSize=256m`
   
   I registering files via` java.io.FileInputStream`,last night i use  `fileServer.closeFiles();` to release is ok now, I guess there was a problem with Jmeter uploading the byte stream. The file in the store before the upload started, but there was no automatic release after the upload ended
   
   
   ![image](https://user-images.githubusercontent.com/3906620/234151330-923bf1f5-406b-4e71-bcd6-ea918c4dd7af.png)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org