Operating System - HP-UX
1819777 Members
3103 Online
109607 Solutions
New Discussion юеВ

Re: Help?? Error: Not enough space to expand environment variable

 
Craig A. Sharp
Super Advisor

Help?? Error: Not enough space to expand environment variable

Hi all,

I am getting this error when running a script.

Not enough environment space to expand environment variable.

Any ideas?

Thanks,

Craig
4 REPLIES 4
Justo Exposito
Esteemed Contributor

Re: Help?? Error: Not enough space to expand environment variable

Hi Craig,

This sounds likea command substitution error, perhaps yo have somethin like that in your script:
variablename=`command`
Then if the result of this is too large you obtain an error.

If you put your script, perhaps we can tell you the problem.

Regards,

Justo.
Help is a Beatiful word
S.K. Chan
Honored Contributor

Re: Help?? Error: Not enough space to expand environment variable

Enabling the kernel parameter "large_ncargs_enabled" might help in your situation. Try to set it to "1" (ie enable it). By doing so it'll increase the deafult environment size (for example it's used to hold PATH var). I can't remember how much it increases it to though but it's worth checking it out.
Craig A. Sharp
Super Advisor

Re: Help?? Error: Not enough space to expand environment variable

I would like to put up the script but it is proprietary in nature (oh well).

I am not able to locate the kernel variable that you suggest. It does not appear in the configurable parameters.

Craig
S.K. Chan
Honored Contributor

Re: Help?? Error: Not enough space to expand environment variable

In that case you're probably on 11.x because the kernel only applies to 10.x. On your system run this ..
# getconf ARG_MAX
If it's already at 2048000 then it's the upper limit already which means ou can ignore my previous recommendation.