Page 1 of 1

Gateway Maintenance

Posted: Wed May 20, 2009 3:51 am
by hilario
Is ther any maintenance (compress, optimize database) to do periodically on the gateway?
I would like to keep controlled the database size and if there is any redologs and so on.

Re: Gateway Maintenance

Posted: Wed May 20, 2009 9:21 am
by justin
Hilario,

Since the Gateway runs on Windows it is, of course, necessary to perform routine maintenance on the system. Specifically, it should be kept up to date with Windows updates and be rebooted occasionally. We have seen a couple isolated cases in which Windows forced an automatic update that did not require a reboot but then the Gateway became unresponsive until the system was rebooted.

The PostgreSQL database automatically vacuums itself periodically but in order to completely recapture space a full vacuum should occasionally be executed. This does not require that the server be stopped but it does lock tables individually so you may want to do this during off-hours if your database is large.

To do a full vacuum...
1) Open a command prompt in C:\onepacs\PostgreSQL\8.3\bin
2) Execute 'vacuumdb -d pacsdb -fvz -U oppostgres'
3) Type in the password (contact me via email if you need this)

This can also be done via PGAdmin if you prefer a graphical interface.

Finally, if you are using your Gateway as an archive you should regularly perform a backup using whatever mechanism you have in place. It is particularly important to include the c:/onepacs directory and the directory your images are stored.

Justin

Re: Gateway Maintenance

Posted: Mon May 28, 2012 6:11 pm
by hilario
Dear all
My directory c:\onepacs\postgeSQL\data\base is 5.2 GB
my feeling is this is too big for the infor I have.
I followed your instructions to vacuum the database, but it didn't improve a lot.
I suppose there are logs or readlog which I need to clean time to time but I don't know how to do it.
The image directory c:\onepacs\server\default\archive is also 5,1 GB.
I have expanded the image filesystem to another disk but I don't know what to do with the DATABase.
Please let me know what options do we have.

Regards

Re: Gateway Maintenance

Posted: Tue May 29, 2012 10:15 am
by justin
Hilario,

It's very difficult to say for certain since I have no information regarding your system (ex. how many studies you have stored). One possibility is that, if this system has been running for a very long time, the audit logs could be taking a lot of space. To delete the audit logs you can do the following:

1) Stop the OnePacs Gateway service
2) In PG Admin, execute the following against pacsdb

drop table audit_record CASCADE;
drop table active_part CASCADE;
drop table part_obj CASCADE;

3) Start the OnePacs Gateway service


Also, please keep in mind that we recommend at least 100 GB of free space for the OnePacs Gateway:

http://wiki.onepacsforums.com/doku.php? ... quirements

Regards,

Justin

Re: Gateway Maintenance

Posted: Thu May 31, 2012 2:19 am
by tom
Hilario,

If you aren't using that particular gateway as an archive (i.e., if you dont mind the studies stored on that gateway being deleted), you could uninstall and reinstall the gateway entirely, to delete everything and start with a new install. Also it looks like the version of the gateway you are using is fairly old. This would also get you on to the latest version of the gateway.

Tom