Last post Dec 12, 2020 05:22 AM by CopBlaster
Dec 10, 2020 02:07 AM|CopBlaster|LINK
I keep getting runtime errors in my ASP.Net WebForms application saying error 26 cannot connect to SQL Server. The SQL Server is running and the login credentials are correct, but every once and awhile I start seeing this error from the application. Eventually
the error goes away and the pages load fine.
My theory is that something is wrong with the database and it cannot be found despite running in the correct place. How do I stop SQL Server from doing this to my website?
I found some errors on the server they say:
Error: 17300, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.
There is insufficient system memory in resource pool 'internal' to run this query.
They are associated with some pages that feature GridView controls bound to SqlDataSource controls that use direct SQL queries to select and filter records from a table full of posts in a database. There are 19,233 records in the posts table and the size
of the table itself is about 50MB. There are other posts linked to it that are part of the query for things like categories and users.
Dec 10, 2020 01:27 PM|PatriceSc|LINK
It happens for a particular query? How much memory do you have on this server? You are using in memory tables?
Also you show really 19000 rows to the user or you do provide filtering/paging capabilities to not fetch them all from the db?
https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-resource-governor-resource-pools-transact-sql?view=sql-server-ver15 could perhaps help.
For this kind of question it could be better to use a specialzed SQL Server forum such as
Dec 12, 2020 05:22 AM|CopBlaster|LINK
I do whatever the ASP.Net GridView Control does by default when bound to a SqlDataSource control with paging enabled.