I have used Oracle database for a Drupal project. It is functioning very fine. But the problem is the blobs table size is increasing gradually and the site getting very slow.
I have checked the following
procedure write_blob(p_hash varchar2, p_blobid out number, p_blob out blob)
as
begin
select blobid,
content
into p_blobid,
p_blob
from blobs
where hash= p_hash
for update;
exception
when no_data_found then
insert into blobs (blobid,content,hash)
values (seq_blobs.nextval,empty_blob,p_hash)
returning blobid, content into p_blobid,
p_blob;
end;
Also I have checked the function to write in blobs table write_blob in database.inc for oracle project.
I manually deleted few records from blobs table, but then the sites gets broken.
I am not able to archive or flush the blobs table entry.
And one more issue is: below query is locking the database and CPU utilization is very high.
SELECT BLOBID, CONTENT FROM BLOBS WHERE HASH= :B1 FOR UPDATE
Please suggest on this regards.
Thanks.
Comments
Comment #2
francesco.sessa commentedI have the same problem.
I see that clearing cache, for example, the reference in the cache table changes, but the old blob is not deleted.
I think that this is the reason of the blob table increasing.
There is any solution?
There is a way to delete unused blobs?
I can ask to add a new datafile for the tablespace, but in the future the problem would reoccur.
Any idea?
Comment #3
aaaristo commentedcheck the blobs_cleaner pl/sql package. blobs_cleaner.cleanup procedure. You should schedule it once a day at non-peak times.
take a backup of your database before trying it. just in case.
Comment #4
bohartD7 reached its EOL back in January 2025, and there is no active release for D7 for this module anymore.
Development or support is not planned for D7. All D7-related issues are marked as outdated in a bunch.
Everyone can apply the patches/suggestions above (not tested by the maintainers, tested by the community) to their D7 projects.
If the issue remains relevant for D10+ versions, merge requests with proposed solutions for a new module version (D10+) are welcome in a new follow-up issue.
Thanks!