fix for ERROR: spawn EMFILE

Jira-issue: WP-1179