Out of memory exception

Hello !

I try to compare 2 databases , one is in Sql Server 2005 on my computer and one that is in Sql Server 2008 on a remote server.
On my computer I have 8 GB ram , on the server I have 24 gb ram and when start comparing database I have this error :

Exception of type "System.OutOfMemoryException" was thrown.
Yesterday I didn't have any problem, for the same databases , I syncronize around 2 millions and half records from 4 million without problems. Today I try to syncronize the rest of them and I practically cannot.
I restart the both, the server and my computer, and the same error.
Redgate is installed on my computer.

Please tell me what is wrong !

Regards,
Mihai

Comments

  • James BJames B Posts: 1,124 Silver 4
    A common cause of an Out of Memory error is if you've run low on disk space.

    Whilst working, SQL Data Compare caches a lot of information locally, by default into your temp location. When working with larget databases this can actually mean you run out of disk space, and then you get the error.

    If that's what is happening, do you have another disk in your machine with more space? You can then create an environment variable called RGTEMP and point it to a folder on that other disk, and information will then be cached there instead.
    Systems Software Engineer

    Redgate Software

  • Thanks for the answer !

    I have 110GB free space on my harddrive. And the database is 5GB.

    What I discovered meantime, If I restart sql service on my machine , the data comparison works. But after I am doing some syncronization and compare again, I have that Out of memory exception.

    Regards,
    Mihai
  • James BJames B Posts: 1,124 Silver 4
    Potentially it may be something not being cleaned up over time. Do you restart the SQL Data Compare app as well as the SQL Service?
    Systems Software Engineer

    Redgate Software

  • yes, I restart both of them.
  • James BJames B Posts: 1,124 Silver 4
    I'd suggest next time it happens just restarting Data Compare- once you've closed it, double check in Task Manager under Processes that it's definitely gone. You may want to then check in your temp folder to see if any of the temp files have been left behind? (It may be worth setting the RGTEMP option here, so that it's easier to track)
    Systems Software Engineer

    Redgate Software

  • And when I evaluate this product, before we bought it, I was working in a virtual environment with the same databases, but at that time it had around 4 GB of data. After I syncrhronize some tables with around 1 million records, the subsequent syncronization run very slow even they had a couple of thousand records.To close the redgate and start again didn't fix this latency so I had to restart the virtual machine in order to have fast comparison and syncronization.
    It seems it doesn't cleanup the ram memory.

    Mihai
  • James BJames B Posts: 1,124 Silver 4
    OK, looking through some internal jobs at this end, I've found that out-of-memory problems have already been reported to look at. I don't know that the exact cause is yet known as it doesn't affect too many people, but I've added a note of this thread to the job so when the developers take a look they can follow this discussion, and get in touch with you if they need any more information.
    Systems Software Engineer

    Redgate Software

  • Yes, it seems is working , restarting only Red gate.The comparison takes around 4GB in temp folder, so I still have plenty of space. The problem is if I not restarting the redgate, the second time I hit Refresh, it will give me Out of memory exception.

    Regards,
    Mihai
  • James BJames B Posts: 1,124 Silver 4
    OK - well I don't have any immediate solution to offer you but hopefully we'll be able to improve this by avoiding potential causes of the error in a future update.
    Systems Software Engineer

    Redgate Software

Sign In or Register to comment.