[jboss-jira] [JBoss JIRA] (WFLY-6336) request-limit should have its attributes as 'required
Tomaz Cerar (JIRA)
issues at jboss.org
Tue Mar 8 05:06:01 EST 2016
[ https://issues.jboss.org/browse/WFLY-6336?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tomaz Cerar moved JBEAP-3714 to WFLY-6336:
------------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-6336 (was: JBEAP-3714)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: Web (Undertow)
(was: Web (Undertow))
Target Release: (was: 7.backlog.GA)
Affects Version/s: 10.0.0.Final
(was: 7.0.0.ER6)
> request-limit should have its attributes as 'required
> -----------------------------------------------------
>
> Key: WFLY-6336
> URL: https://issues.jboss.org/browse/WFLY-6336
> Project: WildFly
> Issue Type: Bug
> Components: Web (Undertow)
> Affects Versions: 10.0.0.Final
> Reporter: Tomaz Cerar
> Assignee: Tomaz Cerar
>
> When creating the 'request-limit' filter in Undertow, there is not required to provide any of two available attributes. Although when I attach such filter to listener and perform request to server, I get following error:
> {code}
> ERROR [io.undertow.request] (default I/O-1) UT005071: Undertow request failed HttpServerExchange{ GET /long-running-servlet/HeavyProcessing request {Accept=[text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8], Accept-Language=[cs,en-US;q=0.8,en;q=0.6], Cache-Control=[no-cache], Accept-Encoding=[gzip, deflate, sdch], DNT=[1], Pragma=[no-cache], User-Agent=[Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.75 Safari/537.36], Connection=[keep-alive], Upgrade-Insecure-Requests=[1], Host=[localhost:8080]} response {}}: java.lang.RuntimeException: WFLYUT0059: Could not construct handler for class: class io.undertow.server.handlers.RequestLimitingHandler. with parameters {
> "max-concurrent-requests" => undefined,
> "queue-size" => undefined
> }
> at org.wildfly.extension.undertow.filters.Filter.createHandler(Filter.java:111)
> at org.wildfly.extension.undertow.filters.Filter.createHttpHandler(Filter.java:68)
> at org.wildfly.extension.undertow.filters.RequestLimitHandler.createHttpHandler(RequestLimitHandler.java:37)
> at org.wildfly.extension.undertow.filters.FilterService.createHttpHandler(FilterService.java:57)
> at org.wildfly.extension.undertow.filters.FilterRef.createHttpHandler(FilterRef.java:69)
> at org.wildfly.extension.undertow.LocationService.configureHandlerChain(LocationService.java:96)
> at org.wildfly.extension.undertow.Host.configureRootHandler(Host.java:117)
> at org.wildfly.extension.undertow.Host.getOrCreateRootHandler(Host.java:171)
> at org.wildfly.extension.undertow.Host$HostRootHandler.handleRequest(Host.java:285)
> at io.undertow.server.handlers.NameVirtualHostHandler.handleRequest(NameVirtualHostHandler.java:54)
> at io.undertow.server.handlers.error.SimpleErrorPageHandler.handleRequest(SimpleErrorPageHandler.java:76)
> at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49)
> at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:158)
> at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
> at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:233)
> at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:131)
> at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:145)
> at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:92)
> at io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:51)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
> at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:291)
> at org.xnio.ChannelListeners$10.handleEvent(ChannelListeners.java:286)
> at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
> at org.xnio.nio.QueuedNioTcpServer$1.run(QueuedNioTcpServer.java:121)
> at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:580)
> at org.xnio.nio.WorkerThread.run(WorkerThread.java:464)
> Caused by: java.lang.IllegalArgumentException
> at org.jboss.dmr.ModelValue.asInt(ModelValue.java:58)
> at org.jboss.dmr.ModelNode.asInt(ModelNode.java:240)
> at org.wildfly.extension.undertow.filters.Filter.createHandler(Filter.java:94)
> ... 25 more
> {code}
> I think we should make those attributes as required when creating such filter as they are required for it's construction anyway.
> Expected:
> Make both attributes of {{request-limit}} filter as required when creating such filter and write operation error in case they are not provided.
> NOTE: also it seems that now when I set attribute {{queue-size}} to 0 then this queue is unlimited. Maybe it would be more suitable to set behaviour like this:
> - undefined -> unlimited queue
> - 0 -> no queue
> - 1..N -> queue size
> well this would be a change of behaviour so maybe it's too late to do such change already...
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list