cancel
Showing results for 
Search instead for 
Did you mean: 

How to Shrink/Reset File stderr1 on a SAP System?

Former Member
0 Kudos

I have a file called stderr1 in the work directory of several of the SAP servers in my production cluster. It has grown to around 19GB's to fill the hard disk on each server.

I have deleted all trace files and WP files from within transaction SM50 but that hasn't deleted it (or re-named it to .old).

If I try to rename or delete it manually, it says I can't because the file is in use.

Please can you tell me how I can reset or shrink the stderr1 file?

Accepted Solutions (1)

Accepted Solutions (1)

JPReyes
Active Contributor
0 Kudos

You can delete, rename, backup, etc stderr1.. when the system is offline.

Also, before youd delete the file, I'll have a look at it to see if theres any particular reason why is it growing so quickly...

Regards

Juan

Former Member
0 Kudos

As it is a production server we don't want to bring it off-line unless we have to. Is there a way to reduce the file size while the SAP system is online?

The system is running okay except for some activities such as printing (where it creates a spool request), etc.

From our Windows system monitoring tools, we can see that the file grew really quckly at 5pm last night, but we do not know why.

Thanks.

Answers (1)

Answers (1)

nelis
Active Contributor
0 Kudos

If you can't shutdown the system currently and this is a Linux/Unix based system, make a backup of the file then you can try a 'cat /dev/null > stderr1'

Edit: saw it was Windows after posting message

Nelis

Former Member
0 Kudos

Thanks

I have tried something similar:

echo "" > stderr1

But that fails saying that the file is locked by a process.

Former Member
0 Kudos

Hi,

I think you have no other choice than stopping/restarting the system to be able to delete the locked file.

You have to understand why the file size grows so big.

I just checked my heavily production ECC system and the file sizes are :

stderr1 0kB

stderr3 0kB

stderr4 155 kB

Regards,

Olivier

Former Member
0 Kudos

Hi Oliver,

Thanks for the information.

We stopped SAP and the SAP Windows services, but were still unable to delete thefile. So we rebooted the servers then were able to delete it.

Since rebooting last night, the file is about 1MB on each server, so we will monitor it.

Thanks.

JPReyes
Active Contributor
0 Kudos

stderr* in my systems is quite small too so I presume there was a recurrent error for them to fill to that size...

Regards

Juan

Former Member
0 Kudos

Our Windows monitoring tools show that at 5pm on Wednesday we had 19GB's free space on our app servers, then suddenly the space was used up. We were not able to read the contents of the stderr1 file because it said the file was corrupt.

We could not see any significant issues at 5pm (+- 30 mins) in the SAP system (SM21 or ST22).

Former Member
0 Kudos

Also just to note, we do have the cleanup reports running as per OSS notes [48400|https://service.sap.com/sap/support/notes/48400] and [16083|https://service.sap.com/sap/support/notes/16083].

We also ran a consistency check and that didn't show any issues.

nelis
Active Contributor
0 Kudos

To see exactly what process is locking that file try the Process Explorer from http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

Then you can determine whether it's a background work process etc and take further action. If/when it happens again.

Nelis

Former Member
0 Kudos

HI Nelis,

I did actually try that but couldn't see the file. Maybe because it was because I was using an older version. I have now downloaded the latest version

Thanks.