0

I am running a process in Windows Subsystem for Linux(WSL), where I am trying to communicate with windows processes. In the process, many mailboxes are required and extensive communication is expected.

At a further point in my code, I am getting the error: Too many open files while mq_open is called.

I have tried increasing the limits in the files mentioned in mq_overview :

  • /proc/sys/fs/mqueue/msg_max

  • /proc/sys/fs/mqueue/queues_max

But I am not able to open message queues with large sizes(more than 80) . I have tried increasing the limits before running my executable in WSL by command ulimit -n and ulimit -q but it doesn't work.

Also , I have tried the solutions proposed by existing answers, but I can't find a way to open large number of queues with more number of messages.

2
  • 1
    Seems like a flawed design. Can't you just use multiple message types with a few queues? Commented Apr 10, 2024 at 6:12
  • @TimRoberts , sorry but it is not possible. Code has been designed by some architect decades ago and communication is not happening between 3 or 4 threads but there are more than 100 threads involved. Commented Apr 10, 2024 at 6:24

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.