Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example demo leaks memory #658

Open
hansole opened this issue Oct 14, 2022 · 0 comments
Open

Example demo leaks memory #658

hansole opened this issue Oct 14, 2022 · 0 comments

Comments

@hansole
Copy link

hansole commented Oct 14, 2022

I previously reported an issue where I had problems with server to client notifications leaking memory.
(ocsigen/eliom#569)
The problem seems to be more general, or an additional issue. The demo application created following the example in oscigen-start also seems to leak.
If I run the example and the start a loop to get the start page, then it will leak memory at a quite high rate. It leaks from ca. 35 MB to 240MB with 10 000 requests.
term1: make test.opt
term2: let c=1 ; while true; do wget -o /dev/null http://localhost:8080/ ; echo $c; let c=c+1; done
term3: top -b -p $(pidof ocsigenserver.opt)

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 145020 hans      20   0  871292  34852  19016 S   0,0   0,4   0:00.13 ocsigenserver.o
 145020 hans      20   0  871292  34852  19016 S   0,0   0,4   0:00.13 ocsigenserver.o
...
 145020 hans      20   0 1089084 238388  19312 S  25,0   2,9   0:29.67 ocsigenserver.o
 145020 hans      20   0 1119940 242612  19312 S  14,6   3,0   0:30.11 ocsigenserver.o
 145020 hans      20   0 1119940 242612  19312 S   0,0   3,0   0:30.11 ocsigenserver.o
 145020 hans      20   0 1119940 242612  19312 S   0,3   3,0   0:30.12 ocsigenserver.o

Ubuntu 22.04.1 LTS \n \l

cohttp-lwt                    4.0.0       CoHTTP implementation using the Lwt concurrency library
cohttp-lwt-unix               4.0.0       CoHTTP implementation for Unix and Windows using Lwt
conduit-lwt                   4.0.2       A portable network connection establishment library using Lwt
conduit-lwt-unix              4.0.2       A network connection establishment library for Lwt_unix
eliom                         10.0.0      Client/server Web framework
js_of_ocaml-lwt               4.0.0       Compiler from OCaml bytecode to JavaScript
lwt                           5.6.1       Promises and event-driven I/O
lwt_log                       1.1.2       Lwt logging library (deprecated)
lwt_ppx                       2.1.0       PPX syntax for Lwt, providing something similar to async/await from JavaScript
lwt_react                     1.2.0       Helpers for using React with Lwt
lwt_ssl                       1.1.3       OpenSSL binding with concurrent I/O
ocsigen-i18n                  4.0.0       I18n made easy for web sites written with eliom
ocsigen-ppx-rpc               1.0         This PPX adds a syntax for RPCs for Eliom and Ocsigen Start
ocsigen-start                 6.1.0       An Eliom application skeleton ready to use to build your own application with users, (pre)registration, notifications, etc
ocsigen-toolkit               3.2.0       Reusable UI components for Eliom applications (client only, or client-server)
ocsigenserver                 5.0.1       A full-featured and extensible Web server
    OCaml version 4.13.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant