Several requests in single connection

Hello!
I am trying to make multiple HTTP 1.1 requests within single SSL session. First request works perfectly. I had intention to send another request right after receiving first reply, but it does not work.

Log shows “close notify message” right after first reply was received:

=> read
=> read record
=> fetch inputin_left: 0, nb_want: 5in_left: 0, nb_want: 5
<= fetch inputinput record: msgtype = 21, version = [3:3], msglen = 18
=> fetch inputin_left: 5, nb_want: 23in_left: 5, nb_want: 23
<= fetch input
=> decrypt buf
<= decrypt buf got an alert message, type: [1:0]is a close notify message

Second request writes without errors (returns number of bytes written) but read returns EOF.

Client is STM32H7, FreeRTOS, SSL code is taken from https://github.com/ARMmbed/mbedtls/blob/development/programs/ssl/ssl_client1.c and works as it is with only minor porting to embedded system.

Please, help me understand what could be a reason this “close notify message” - is it SSL problem or Apache closing connection not following “keep-alive”?
Full log:

  . Seeding the random number generator... ok
  . Loading the CA root certificate ... ok (0 skipped)
  . Connecting to tcp/crm.iwtm.com/443... ok
  . Setting up the SSL/TLS structure... ok
  . Performing the SSL/TLS handshake... handshake ok
  . Verifying peer X.509 certificate... ok
  > Write to server: 876 bytes written

=> write
=> write record
=> encrypt bufbefore encrypt: msglen = 876, including 0 bytes of padding
<= encrypt bufoutput record: msgtype = 23, version = [3:3], msglen = 892
=> flush outputmessage length: 897, out_left: 897
<= flush output
<= write record
<= write 

POST /api/store HTTP/1.1
Host: www.example.com
User-Agent: STM32H7
Content-Type: application/json; charset=utf-8
Accept: */*
Content-Length: 602
Connection: keep-alive
Keep-Alive: timeout=5, max=10

{"timestamp": "1644342332", ... }

  < Read from server: 318 bytes read

=> read
=> read record
=> fetch inputin_left: 0, nb_want: 5in_left: 0, nb_want: 5
<= fetch inputinput record: msgtype = 23, version = [3:3], msglen = 334
=> fetch inputin_left: 5, nb_want: 339in_left: 5, nb_want: 339
<= fetch input
=> decrypt buf
<= decrypt buf
<= read record
<= read 

HTTP/1.1 200 OK
Date: Tue, 08 Feb 2022 17:45:48 GMT
Server: Apache/2.4.41 (Ubuntu)
Cache-Control: no-cache, private
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 599
Content-Length: 36
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/json

{"status":1,"message":"Data stored"}

=> read
=> read record
=> fetch inputin_left: 0, nb_want: 5in_left: 0, nb_want: 5
<= fetch inputinput record: msgtype = 21, version = [3:3], msglen = 18
=> fetch inputin_left: 5, nb_want: 23in_left: 5, nb_want: 23
<= fetch input=> decrypt buf
<= decrypt buf got an alert message, type: [1:0]is a close notify message


  > Write to server:

=> write
=> write record
=> encrypt bufbefore encrypt: msglen = 876, including 0 bytes of padding
<= encrypt bufoutput record: msgtype = 23, version = [3:3], msglen = 892
=> flush outputmessage length: 897, out_left: 897
<= flush output
<= write record
<= write 876 bytes written

POST /api/store HTTP/1.1
Host: www.example.com
User-Agent: STM32H7
Content-Type: application/json; charset=utf-8
Accept: */*
Content-Length: 602
Connection: keep-alive
Keep-Alive: timeout=5, max=10

{"timestamp": "1644342332", ... }

  < Read from server: EOF

=> read
=> read record
=> fetch inputin_left: 0, nb_want: 5in_left: 0, nb_want: 5


=> write close notify
=> send alert messagesend alert level=1 message=0
=> write record
=> encrypt bufbefore encrypt: msglen = 2, including 0 bytes of padding
<= encrypt bufoutput record: msgtype = 21, version = [3:3], msglen = 18
=> flush outputmessage length: 23, out_left: 23
<= flush output
<= write record
<= send alert message
<= write close notify
=> free
<= free

This is Apache settings. Another server kept connection open and allowed to receive another file within same session.
Question closed