# BigIP ASM Problems with FileUploads with SOAP

**URL:** <https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460>\
**Category:** Technical Forums\
**Tags:** security, asm, application-delivery, xml\
**Created:** [September 1, 2022, 9:03am UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460 "2022-09-01T09:03:35Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![P\_Kueppers](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/p_kueppers/32/22789_2.png) [@P\_Kueppers](https://community.f5.com/u/P_Kueppers)\
**Post date:** [September 1, 2022, 9:03am UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/1 "2022-09-01T09:03:35Z")

</div>

Hi there,

actually my ASM Policy is blocking a file upload for one application with the error message:

```tcl
HTTP protocol compliance failed
Chunks number exceeds request chunks limit: 1000

```

I raised the chunks limit blindly from 1000 to 1500 with no success. Where I can see the actually number of chunks without capturing the traffic? After disabling the funktion “Unparsable request content” Upload went through without a problem. But from the notice I would stick this on?

```tcl
Note that disabling this check can result in losing many enforcement features in the ASM.

```

Sametime I get the following syslogs:

```tcl
ASM out of memory error: event code X242 Exceeded maximum memory assigned for XML/JSON processing
Cannot allocate 27415074 more bytes for XML parser. current memory size 837505174 (in bytes)

```

As you can see I raised the available memory for XML request from 450MB (default) to nearly the double.

---

<div class="post-metadata">

**Author:** ![HarunTuna](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/haruntuna/32/17411_2.png) [@HarunTuna](https://community.f5.com/u/HarunTuna)\
**Post date:** [September 1, 2022, 10:24am UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/2 "2022-09-01T10:24:14Z")

</div>

Hi,

Could you check '[[https://support.f5.com/csp/article/K22526837’](https://support.f5.com/csp/article/K22526837’](https://support.f5.com/csp/article/K22526837'%5D(https://support.f5.com/csp/article/K22526837'))&nbsp; ?

---

<div class="post-metadata">

**Author:** ![P\_Kueppers](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/p_kueppers/32/22789_2.png) [@P\_Kueppers](https://community.f5.com/u/P_Kueppers)\
**Post date:** [September 1, 2022, 10:28am UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/3 "2022-09-01T10:28:53Z")

</div>

Hi HarunT,

yep checked that already. It feels that the additinal required memory is raising over time. So I changed the value already to nearly the double and everytime the message appears it wants about 20-30mb more and raising.

---

<div class="post-metadata">

**Author:** ![AubreyKingF5](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/aubreykingf5/32/21025_2.png) [@AubreyKingF5](https://community.f5.com/u/AubreyKingF5)\
**Post date:** [September 2, 2022, 3:33pm UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/4 "2022-09-02T15:33:37Z")

</div>

What is the size of the file in question?

---

<div class="post-metadata">

**Author:** ![P\_Kueppers](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/p_kueppers/32/22789_2.png) [@P\_Kueppers](https://community.f5.com/u/P_Kueppers)\
**Post date:** [September 2, 2022, 8:57pm UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/5 "2022-09-02T20:57:50Z")

</div>

Two files with bearly under 10MB. XML Profile and every other setting limits I found are at least high enough or any.

---

<div class="post-metadata">

**Author:** ![AubreyKingF5](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/aubreykingf5/32/21025_2.png) [@AubreyKingF5](https://community.f5.com/u/AubreyKingF5)\
**Post date:** [September 6, 2022, 3:34pm UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/6 "2022-09-06T15:34:52Z")

</div>

Very odd. The error indicates that it’s trying to handle ~840 Meg.&nbsp; ASM logs show anything?

---

<div class="post-metadata">

**Author:** ![P\_Kueppers](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/p_kueppers/32/22789_2.png) [@P\_Kueppers](https://community.f5.com/u/P_Kueppers)\
**Post date:** [September 7, 2022, 8:04am UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/7 "2022-09-07T08:04:18Z")

</div>

Hi, yes seems a bit strange to me. No other logs than posted above. Since this error did not occure the last days, logs were pruned. Since we are still on the 14.x branche with this device, I consider switchting to 15.x … maybe this gets solved magicaly

---

<div class="post-metadata">

**Author:** ![P\_Kueppers](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/p_kueppers/32/22789_2.png) [@P\_Kueppers](https://community.f5.com/u/P_Kueppers)\
**Post date:** [September 20, 2022, 11:11am UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/8 "2022-09-20T11:11:26Z")

</div>

Maybe anyone got ad idea?

It happens 2-3times a day and we are already at 1GB but keep getting

```tcl
BD_XML|ERR |Sep 20 12:11:39.672|26884|xml_validation.cpp:0244|Cannot allocate 22474662 more bytes for XML parser. current memory size 1002457583 (in bytes)

```

---

<div class="post-metadata">

**Author:** ![Leslie\_Hubertus](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/leslie_hubertus/32/11644_2.png) [@Leslie\_Hubertus](https://community.f5.com/u/Leslie_Hubertus)\
**Post date:** [September 21, 2022, 7:05pm UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/9 "2022-09-21T19:05:27Z")

</div>

Hey&nbsp; @P_Kueppers &nbsp; - are you still seeing the same issue, or were you able to resolve it?

---

<div class="post-metadata">

**Author:** ![P\_Kueppers](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/p_kueppers/32/22789_2.png) [@P\_Kueppers](https://community.f5.com/u/P_Kueppers)\
**Post date:** [September 27, 2022, 2:43pm UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/10 "2022-09-27T14:43:50Z")

</div>

Nope. Same issue every few days and still on 14.x but I cant imagine that this is a bug and will be fixed with 15.x

I think the messages doesnt come from the application I suspect rather a other one. How can I track this? Some fancy iRule to log this big XML requests? I can imagine that this is coming from a total different application where Im not informed about xml/soap requests.

---

<div class="post-metadata">

**Author:** ![Leslie\_Hubertus](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/leslie_hubertus/32/11644_2.png) [@Leslie\_Hubertus](https://community.f5.com/u/Leslie_Hubertus)\
**Post date:** [September 27, 2022, 3:15pm UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/11 "2022-09-27T15:15:49Z")

</div>

Tagging&nbsp; @AubreyKingF5 &nbsp;again for his technical expertise…

---

<div class="post-metadata">

**Author:** ![P\_Kueppers](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/p_kueppers/32/22789_2.png) [@P\_Kueppers](https://community.f5.com/u/P_Kueppers)\
**Post date:** [September 27, 2022, 8:48pm UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/12 "2022-09-27T20:48:13Z")

</div>

Thanks, hopefully he can help me out… maybe i need to deploy something like this on all vservers to find that black sheep

```tcl
when HTTP_REQUEST {
    #Check if the request is a POST, with a content type of text and size over 10MB
    if {[HTTP::has_responded]} {
        return
    }
elseif {[HTTP::method] eq "POST"}{
	if {[HTTP::header value "Content-Type"] contains "xml" or [HTTP::header value "Content-Type"] contains "json"}{
	if {[HTTP::header value "Content-Length"] >= 10000000}{
    log local0. "This is the HTTP Path: [HTTP::path]"
    log local0. "Client [IP::client_addr] This is the HTTP Host [HTTP::host]"
    log local0. "Client [IP::client_addr] accessed [virtual]"
    log local0. "Query string of URI: [HTTP::uri] is [URI::query [HTTP::uri]]"
    log local0. "HTTP Content Length Header = [HTTP::header value "content-length"]"
    log local0. "HTTP Content Type Header = [HTTP::header value "content-type"]"
}
}
}
}

```

---

<div class="post-metadata">

**Author:** ![AubreyKingF5](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/aubreykingf5/32/21025_2.png) [@AubreyKingF5](https://community.f5.com/u/AubreyKingF5)\
**Post date:** [September 27, 2022, 11:46pm UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/13 "2022-09-27T23:46:08Z")

</div>

Not a bad plan. Can you show me the tmsh out for the http profile? I take it you’re not doing anything fancy like HTTP2?

---

<div class="post-metadata">

**Author:** ![P\_Kueppers](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/p_kueppers/32/22789_2.png) [@P\_Kueppers](https://community.f5.com/u/P_Kueppers)\
**Post date:** [September 28, 2022, 7:05am UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/14 "2022-09-28T07:05:21Z")

</div>

Pretty default I would say

We have some http/2 servers active:

```tcl
ltm profile http2 Standard_http2_profile {
    app-service none
    concurrent-streams-per-connection 100
    connection-idle-timeout 60
    defaults-from http2
}
ltm profile http2 http2 {
    activation-modes { alpn }
    app-service none
    concurrent-streams-per-connection 10
    connection-idle-timeout 300
    enforce-tls-requirements enabled
    frame-size 2048
    header-table-size 4096
    include-content-length disabled
    insert-header disabled
    insert-header-name X-HTTP2
    receive-window 32
    write-size 16384
}

```

But most is http/1.2

```tcl
ltm profile http SecureWEB_http {
    app-service none
    defaults-from http
    enforcement {
        known-methods { CONNECT DELETE GET HEAD LOCK OPTIONS POST PROPFIND PUT UNLOCK }
    }
    header-insert X-Forwarded-Proto:https
    hsts {
        maximum-age 31536000
        mode enabled
    }
    insert-xforwarded-for enabled
    proxy-type reverse
    redirect-rewrite all
    server-agent-name LB
}
ltm profile http http {
    accept-xff disabled
    app-service none
    basic-auth-realm none
    encrypt-cookies none
    enforcement {
        known-methods { CONNECT DELETE GET HEAD LOCK OPTIONS POST PROPFIND PUT TRACE UNLOCK }
        max-header-count 64
        max-header-size 32768
        max-requests 0
        pipeline allow
        truncated-redirects disabled
        unknown-method allow
    }
    fallback-host none
    fallback-status-codes none
    header-erase none
    header-insert none
    hsts {
        include-subdomains enabled
        maximum-age 16070400
        mode disabled
        preload disabled
    }
    insert-xforwarded-for disabled
    lws-separator none
    lws-width 80
    oneconnect-status-reuse "200 206"
    oneconnect-transformations enabled
    proxy-type reverse
    redirect-rewrite none
    request-chunking preserve
    response-chunking selective
    response-headers-permitted none
    server-agent-name LB
    sflow {
        poll-interval 0
        poll-interval-global no
        sampling-rate 0
        sampling-rate-global no
    }
    via-request preserve
    via-response preserve
    xff-alternative-names none
}

```

---

<div class="post-metadata">

**Author:** ![P\_Kueppers](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/p_kueppers/32/22789_2.png) [@P\_Kueppers](https://community.f5.com/u/P_Kueppers)\
**Post date:** [September 30, 2022, 8:11pm UTC](https://community.f5.com/t/bigip-asm-problems-with-fileuploads-with-soap/70460/15 "2022-09-30T20:11:15Z")

</div>

Okay I maybe give up. Should I raise a support ticket? I put the iRule Logging on every vserver I think of such uploads but there were only one match in the near of a event log but that cant be a problem:

```tcl
Sep 30 14:59:22 .dmz.local info tmm1[21243]: Rule /Common/URL_Logging <HTTP_REQUEST>: HTTP Content Length Header = 11019932
Sep 30 14:59:22 .dmz.local info tmm1[21243]: Rule /Common/URL_Logging <HTTP_REQUEST>: HTTP Content Type Header = application/soap+xml; charset=utf-8

 BD_XML|ERR |Sep 30 15:03:51.849|26888|xml_validation.cpp:0244|Cannot allocate 19503077 more bytes for XML parser. current memory size 1008875463 (in bytes)

```

And 4 min later;

```tcl
Broadcast message from systemd-journald@.dmz.local (Fri 2022-09-30 15:03:52 CEST):
perl[26640]: 01310003:0: ASM out of memory error: event code X242 Exceeded maximum memory assigned for XML/JSON processing
2022 Sep 30 15:03:52 .dmz.local perl[26640]: 01310003:0: ASM out of memory error: event code X242 Exceeded maximum memory assigned for XML/JSON processing

```
