cancel
Showing results for 
Search instead for 
Did you mean: 

DBSpace8 filegroup reached it's Maxsize and caused the HL7 Listener to keep crashing

Peter_Scaramuzz
Star Contributor
Star Contributor

We had an issue where the HL7 listener service kept stopping. Working with OnBase support and running the client as a pseudo HL7 listener we saw the error "Could not allocate space for object 'hsi.hl7listenerlog' in database 'OnBasePRD' because the 'DBSpace8' filegroup is full". It was an easy fix once we  knew what was the issue. I just increased the maxsize by 200gb to give us breathing room. What I would like advice on is a couple of things. First what would be the best method to monitor that these max growth sizes are reaching their max point? Second is it out of the question to just set this to unlimited? This has happened before and whenever we ask these questions we get referred to the MRG which really defer to the DBA. Can anyone provide some advice on potentially setting this to unlimited and also best practices to monitor if some of these filegroups exceed their max size? Any advice would be greatly appreciated!!

4 REPLIES 4

Joel_Moore2
Star Contributor
Star Contributor

Hey Peter - 

 

I don't think it's unreasonable or uncommon to set the growth to unlimited. If doing that, there is an Auto-Growth parameter for the database files that needs to be considered. There isn't really a magic bullet answer for what that should be set to, but what you want to avoid is having an overwhelming amount of growth events happening because the growth parameter is small. This will saturate your I/O bandwidth and cause slow, potentially crippling, database performance. This is probably still better than having the entire system go down, though. 

 

In terms of monitoring the size, there are solutions ranging from free to paid if you do some searching. The free solutions typically involve a script running on an interval via the SQL Agent that will send an email when a certain % of the disk space has been consumed. The paid solutions will effectively do the same thing behind the scenes, but you'll have the advantage of using a GUI to configure it instead of trusting a script you find on the web. If you are already paying for a 3rd party database monitoring tool (Solarwinds, Red Gate, etc...) these should all have something you can configure.  

 

I'm sure there are other monitoring solutions that aren't SQL Server/Database specific that can probe the free space on a disk drive and send alerts when necessary, I just don't have any first hand experience with them.

 

Hope this helps,

-Joel 

Agreed. We have all of our DBSpace tables set to Unlimited. It just makes it so that we don't have to worry about them at all.

Peter_Scaramuzz
Star Contributor
Star Contributor

I didn't realize that one of our former DBA's created a SQL agent job on our old server but never enabled it on the new database. The script runs every night. It's something, but it would be better if you only get a message when you are close to max'ing out. I am going to go and set it to unlimited. As you mentioned an outage is not a good thing. I think that is prudent and appreciate your opinions on that. We do have warnings if the drive space is getting tight. Right now btw it increases in increments of 1024kb. 

 

Declare @MailBody varchar(5000) = '';
Declare @msg varchar(5000) = '';
Declare @filename varchar(500) = '';
Declare @Physicalname varchar(500) = '';
Declare @PercentAvailable int = 0;

declare c_t cursor for
SELECT name AS 'FileName' ,
physical_name AS 'PhysicalName',
round((100 - (CAST(FILEPROPERTY(name, 'SpaceUsed') AS float)/max_size)* 100) ,2) AS 'PercentageAvailable'
FROM sys.database_files
where (max_size/128) != 0 and type_desc = 'ROWS'
and ((CAST(FILEPROPERTY(name, 'SpaceUsed') AS float)/max_size)* 100) > 80;
open c_t
fetch next from c_t into @filename, @PhysicalName, @PercentAvailable
while @@FETCH_STATUS = 0
BEGIN
select @MailBody = @MailBody + '<tr><td>' + @FileName + '</td><td>' + @PhysicalName + '</td><td>' + cast(@PercentAvailable as varchar(10)) + '</td></tr>'
fetch next from c_t into @filename, @PhysicalName, @PercentAvailable
END
close c_t
deallocate c_t

if (@MailBody != '')
BEGIN
select @msg = '<table><tr><td><b>File name</b></td><td><b>Physical file name</b></td><td><b>Percent Available</b></td></tr>' + @MailBody + '</table>';

EXEC msdb.dbo.SP_SEND_DBMAIL
@profile_name='smtp',
@recipients='xxx2@xxx.org;xxx@xxx.org',
@subject = 'OnBasePRD data files percent available',
@body = @msg,
@body_format = 'HTML'
END

I went and checked the Database Reference Guide and found this general tip:

 

Pre-size the OnBase database files so they do not auto-grow. Modify the growth increments to be 100MB for larger files (DBSpaces 1, 2, 6, 9, 2i, 6i, 9i, 10) and 50 MB for all other file groups.

 

The statement here appears somewhat contradictory, but I think the essence is good. Try and pre-size the files as best you can, but configure the growth to be 100 MB or 50 MB depending. 

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.