--- title: "ERROR: Could not allocate space for object in database because the filegroup is full" slug: "error-could-not-allocate-space-for-object-in-database-because-the-filegroup-is-full" updated: 2024-09-24T07:51:09Z published: 2024-09-24T07:51:09Z canonical: "help.hyperscience.ai/error-could-not-allocate-space-for-object-in-database-because-the-filegroup-is-full" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.hyperscience.ai/llms.txt > Use this file to discover all available pages before exploring further. # ERROR: Could not allocate space for object in database because the filegroup is full ## Issue The following error appears in the logs: ```powershell [2022-02-02 18:36:06.523 | ERROR | MainThread | django.request:230] Internal Server Error: /saml2/acs/\nTraceback (most recent call last):\n  File \"/var/www/venv/lib/python3.7/site-packages/django/db/backends/utils.py\", line 84, in _execute\n    return self.cursor.execute(sql, params)\n  File \"/var/www/forms/forms/forms/db/backends/mssql/pyodbc/base.py\", line 422, in execute\n    return self.cursor.execute(sql, params)\npyodbc.ProgrammingError: ('42000', \"[42000] [Microsoft][ODBC Driver 17 for SQL Server] [SQL Server]Could not allocate space for object 'dbo.activity_auditlog'.'PK__reports___123456789' in database 'dbname' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup. (1105) (SQLExecDirectW)\")\n\nThe above exception was the direct cause of the following exception:\n\nTraceback (most recent call last):\n  File \"/var/www/venv/lib/python3.7/site-packages/django/core/handlers/exception.py\", line 47, in inner\n    response = get_response(request)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/core/handlers/base.py\", line 181, in _get_response\n    response = wrapped_callback(request, *callback_args, **callback_kwargs)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/views/generic/base.py\", line 70, in view\n    return self.dispatch(request, *args, **kwargs)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/utils/decorators.py\", line 43, in _wrapper\n    return bound_method(*args, **kwargs)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/views/decorators/csrf.py\", line 54, in wrapped_view\n    return view_func(*args, **kwargs)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/views/generic/base.py\", line 98, in dispatch\n    return handler(request, *args, **kwargs)\n  File \"/var/www/venv/lib/python3.7/site-packages/djangosaml2/views.py\", line 529, in post\n    auth.login(self.request, user)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/contrib/auth/__init__.py\", line 135, in login\n user_logged_in.send(sender=user.__class__, request=request, user=user)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/dispatch/dispatcher.py\", line 182, in send\n    for receiver in self._live_receivers(sender)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/dispatch/dispatcher.py\", line 182, in \n    for receiver in self._live_receivers(sender)\n  File \"/var/www/forms/forms/user_profile/signals.py\", line 16, in track_user_logged_in\n    app_config.user_logged_in(user)\n  File \"/var/www/forms/forms/reports/apps.py\", line 46, in user_logged_in\n    ActivityTracker.log(UserActivityType.LOGIN, user)\n  File \"/var/www/forms/forms/activity/activity_tracking.py\", line 49, in log\n    ActivityTracker.bulk_create([ActivityTracker.build(activity_name, user, **kwargs)])\n  File \"/var/www/forms/forms/activity/activity_tracking.py\", line 112, in bulk_create\n    AuditLog.objects.bulk_create(audit_logs)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/db/models/manager.py\", line 85, in manager_method\n    return getattr(self.get_queryset(), name)(*args, **kwargs)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/db/models/query.py\", line 515, in bulk_create\n    objs_without_pk, fields, batch_size, ignore_conflicts=ignore_conflicts,\n  File \"/var/www/venv/lib/python3.7/site-packages/django/db/models/query.py\", line 1293, in _batched_insert\n    self._insert(item, fields=fields, using=self.db, ignore_conflicts=ignore_conflicts)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/db/models/query.py\", line 1270, in _insert\n    return query.get_compiler(using=using).execute_sql(returning_fields)\n  File \"/var/www/forms/forms/forms/db/backends/mssql/compiler.py\", line 142, in execute_sql\n    ret = super().execute_sql(*args, **kwargs)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/db/models/sql/compiler.py\", line 1416, in execute_sql\n    cursor.execute(sql, params)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/db/backends/utils.py\", line 66, in execute\n    return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/db/backends/utils.py\", line 75, in _execute_with_wrappers\n    return executor(sql, params, many, context)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/db/backends/utils.py\", line 84, in _execute\n    return self.cursor.execute(sql, params)\n  File \"/var/www/venv/lib/python3.7/site-packages/django/db/utils.py\", line 90, in __exit__\n    raise dj_exc_value.with_traceback(traceback) from exc_value\n  File \"/var/www/venv/lib/python3.7/site-packages/django/db/backends/utils.py\", line 84, in _execute\n    return self.cursor.execute(sql, params)\n  File \"/var/www/forms/forms/forms/db/backends/mssql/pyodbc/base.py\", line 422, in execute\n    return self.cursor.execute(sql, params)\ndjango.db.utils.ProgrammingError: ('42000', \"[42000] [Microsoft][ODBC Driver 17 for SQL Server] [SQL Server]Could not allocate space for object 'dbo.activity_auditlog'.'PK__reports___123456789' in database 'dbname' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup. (1105) (SQLExecDirectW)\") ``` ## Affected versions All versions ## Affected configurations All configurations with an MSSQL database ## Cause If the mentioned storage for the database is full, the database will not be able to utilize it. ## Solution / Workaround The storage on the database server should be reviewed for potential cleanup, or it should have additional capacity allocated to it.