You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/10/02 06:17:06 UTC

[GitHub] [apisix-java-plugin-runner] dargoner opened a new issue, #198: bug: 通过网关上传附件,16m左右会报错

dargoner opened a new issue, #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198

   ### Issue description
   
   ### Environment
   
   * apisix-java-plugin-runner 3.0.1-SNAP
   * apisix 2.15.0
   
   ### Minimal test code / Steps to reproduce the issue
   
   1. 使用POSTMAN模拟上传附件
   2. 附件大小大于16M报 503错误
   
   ### What's the actual result? (including assertion message & call stack if applicable)
   
   ### What's the expected result?
   
   看到 plugins/ext-plugin/init.lua 有个限制
   
   ![image](https://user-images.githubusercontent.com/1793850/193440754-82149e52-8889-4822-b6d1-5513ce85f5d2.png)
   
   调大这个MAX_DATA_SIZE限制,好像无效,继续报错,暂时无解
   


-- 
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: notifications-unsubscribe@apisix.apache.org.apache.org

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


[GitHub] [apisix-java-plugin-runner] dargoner commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
dargoner commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1272826779

   MAX_DATA_SIZE 调大到100,但是上传30m附件也会报错的


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] tzssangglass commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1272243710

   > 调整为:MAX_DATA_SIZE=1024x1024x110
   
   OK it looks like the plugin runner doesn't handle exceeding MAX_DATA_SIZE very well at the moment. plugin runner is not designed for such a large body scenario. But I don't think it matters now.
   Can I know your scenario? When would you need to pass a body larger than 16 M to the plugin runner?


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] dargoner commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
dargoner commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1270031227

   java plugin filter 
   ![image](https://user-images.githubusercontent.com/1793850/194323099-fca895e6-4dcc-4e13-ad1b-e8b54b1aa211.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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] tzssangglass commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1272830314

   > MAX_DATA_SIZE 调大到100,但是上传30m附件也会报错的
   
   As mentioned above, this is a limitation of StringBuilder. It has nothing to do with MAX_DATA_SIZE. Maybe you need to change the source code here and instead of using StringBuilder, read `this.resp.result(i)` as a file stream 


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] dargoner commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
dargoner commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1270173811

   ext-plugin/init.lua
   ![image](https://user-images.githubusercontent.com/1793850/194341778-142ea608-270a-4d27-8ee5-c67cb1242d07.png)
   postman test
   ![image](https://user-images.githubusercontent.com/1793850/194341285-9cf0671d-8746-481b-9a62-7d0ed28984c4.png)
   apisix error
   ![image](https://user-images.githubusercontent.com/1793850/194341580-aab0475f-092f-4d8d-822e-71852d0fb71e.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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] tzssangglass commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1272464065

   After verification, I think the problem is related to the maximum size of the StringBuilder. ref: https://stackoverflow.com/questions/38067717/how-many-characters-can-a-java-stringbuilder-hold
   
   https://github.com/apache/apisix-java-plugin-runner/blob/d2fe045624fad0b7162b11b8acf836d724f870ea/runner-plugin-sdk/src/main/java/org/apache/apisix/plugin/runner/ExtraInfoResponse.java#L38-L43
   
   100M file over the max size of StringBuilder
   


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] dargoner commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
dargoner commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1272262904

   主要业务场景需要的,上传附件比较大,如扫描的影像件(一起压缩后也很大)等,也不是要能无限大,能调整到100-200m左右应该也够了。


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] dargoner commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
dargoner commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1272224475

   调整为:MAX_DATA_SIZE=1024*1024*110


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] tzssangglass commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1272274556

   I will track this issue


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] dargoner commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
dargoner commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1270031940

   ![image](https://user-images.githubusercontent.com/1793850/194323198-4faa1aa0-d18d-48c1-be15-f10e647ff7dd.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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] dargoner commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
dargoner commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1272224351

   > So that's the limit. After you adjust MAX_DATA_SIZE, you say it doesn't work, are there some error logs about it?
   
   ![image](https://user-images.githubusercontent.com/1793850/194688477-c318532c-be41-41f9-b995-7a79e18b2bdd.png)
   plugin error


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] tzssangglass commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1271846846

   So that's the limit. After you adjust MAX_DATA_SIZE, you say it doesn't work, are there some error logs about it?


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] dargoner commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
dargoner commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1272262975

   是不是netty什么限制


-- 
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: notifications-unsubscribe@apisix.apache.org

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


[GitHub] [apisix-java-plugin-runner] dargoner commented on issue #198: bug: 通过网关上传附件,16m左右会报错

Posted by GitBox <gi...@apache.org>.
dargoner commented on issue #198:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/198#issuecomment-1270026848

   ![image](https://user-images.githubusercontent.com/1793850/194322492-6a5cb293-f977-414b-8e90-c9c948e38fa7.png)
   
   
   > > 调大这个MAX_DATA_SIZE限制,好像无效,继续报错,暂时无解
   > 
   > What are the error logs about this? Are you observing errors generated by this limitation?
   
   


-- 
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: notifications-unsubscribe@apisix.apache.org

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