[MXS-3040] Cannot allocate memory. Increase pipe-user-pages-soft (sysctl fs.pipe-user-pages-soft) or reduce pipe-max-size (sysctl fs.pipe-max-size). Created: 2020-06-16  Updated: 2021-09-12  Resolved: 2021-08-31

Status: Closed
Project: MariaDB MaxScale
Component/s: avrorouter
Affects Version/s: 2.4.9
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: wilsonlau Assignee: markus makela
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

k8s


Attachments: PNG File QQ截图20200616231006.png    
Sprint: MXS-SPRINT-110, MXS-SPRINT-139

 Description   

2020-06-16 22:47:33 warning: Failed to increase pipe buffer size to '1073741824': 12, Cannot allocate memory. Increase pipe-user-pages-soft (sysctl fs.pipe-user-pages-soft) or reduce pipe-max-size (sysctl fs.pipe-max-size).
2020-06-16 22:47:33 warning: Failed to increase pipe buffer size to '1073741824': 12, Cannot allocate memory. Increase pipe-user-pages-soft (sysctl fs.pipe-user-pages-soft) or reduce pipe-max-size (sysctl fs.pipe-max-size).
2020-06-16 22:47:33 warning: Failed to increase pipe buffer size to '1073741824': 12, Cannot allocate memory. Increase pipe-user-pages-soft (sysctl fs.pipe-user-pages-soft) or reduce pipe-max-size (sysctl fs.pipe-max-size).
2020-06-16 22:47:33 warning: Failed to increase pipe buffer size to '1073741824': 12, Cannot allocate memory. Increase pipe-user-pages-soft (sysctl fs.pipe-user-pages-soft) or reduce pipe-max-size (sysctl fs.pipe-max-size).
2020-06-16 22:47:33 warning: Failed to increase pipe buffer size to '1073741824': 12, Cannot allocate memory. Increase pipe-user-pages-soft (sysctl fs.pipe-user-pages-soft) or reduce pipe-max-size (sysctl fs.pipe-max-size).



 Comments   
Comment by markus makela [ 2020-06-16 ]

What happens if you increase pipe-user-pages soft or reduce pipe-max-size?

Comment by wilsonlau [ 2020-06-17 ]

sysctl -w fs.pipe-max-size=1048576 fs.pipe-user-pages-soft=16384

the warning also happen

Comment by markus makela [ 2020-07-03 ]

Perhaps this is related to some soft/hard limits for the maxscale user?

Comment by markus makela [ 2021-08-25 ]

wilsonlau78 have you been able to reproduce this in a non-production environment?

Comment by markus makela [ 2021-08-31 ]

The error 12, Cannot allocate memory suggests that the fnctl call fails with ENOMEM. Googling shows that this might be due to the kernel not being able to allocate enough memory for the pipe.

From pipe_set_size:

static long pipe_set_size(struct pipe_inode_info *pipe, unsigned long arg)
{
	...
 
	bufs = kcalloc(nr_pages, sizeof(*bufs),
		       GFP_KERNEL_ACCOUNT | __GFP_NOWARN);
	if (unlikely(!bufs)) {
		ret = -ENOMEM;
		goto out_revert_acct;
	}

Comment by markus makela [ 2021-08-31 ]

This seems like something specific to the environment where MaxScale is run. If you can create a reproducible test case, we can reopen this.

Generated at Thu Feb 08 04:18:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.