我正在使用骆驼通过Post Method公开REST API,
此API旨在存储系统的所有流量,
此API的实现在本地和登台环境中均运行良好,
但是当我将其部署到生产环境中时,有5%的请求返回了 404 Not Found 错误,
机器资源非常高, 8个CPU 40G内存。
API平均每秒存储30个请求。
Stacktrace:
org.apache.camel.http.common.HttpOperationFailedException: HTTP operation failed invoking https://integration.Company.com/warehouse/rest/v1 with statusCode: 404
at com.Company.integration.common.camel.components.asynchttp.AsyncHttpProducer.populateHttpOperationFailedException(AsyncHttpProducer.java:295)
at com.Company.integration.common.camel.components.asynchttp.AsyncHttpProducer.process(AsyncHttpProducer.java:190)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.TryProcessor.process(TryProcessor.java:113)
at org.apache.camel.processor.TryProcessor.process(TryProcessor.java:84)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.Pipeline.proce…
答案 0 :(得分:0)
我在这里有点困惑,在您的屏幕快照上,看起来您正在使用带有servlet组件的Camel REST DSL,但是在您的堆栈跟踪中,看起来您有一个调用AsyncProcessorConverterHelper
的自定义组件,但是我可能错了但是,您能澄清一下吗?
P / S:这本来应该是评论,而不是答案,但是我没有足够的重复来评论。