static resource usage - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Giancarlo AmatiGiancarlo Amati 

static resource usage

Dear All,
where do I check if we have hit the limits of the Static Resource usage? I've found the Data Storage usage but I can't tell about the static resources.

Thank you.

GC

Best Answer chosen by Giancarlo Amati
Tommaso BolisTommaso Bolis
Hi Giancarlo,
static resources doesn't count against file storage and data storage. They have their own limit and it's 250MB.

Run this query in developer console and it will return the size in bytes then convert the bytes into MB to get the actuall size.Then subtract the convert size with 250 you get the remaining size. An organization can have up to 250 MB of static resources, total
 
SELECT SUM(BodyLength) FROM StaticResource
If you contain any managed package static resource then exclude that in your query and then get the result, because managed package components won't count towards your org limit

Here an idea you can upvote for increasing the 250MB limit
https://success.salesforce.com/ideaView?id=08730000000kuZAAAY

All Answers

Tommaso BolisTommaso Bolis
Hi Giancarlo,
static resources doesn't count against file storage and data storage. They have their own limit and it's 250MB.

Run this query in developer console and it will return the size in bytes then convert the bytes into MB to get the actuall size.Then subtract the convert size with 250 you get the remaining size. An organization can have up to 250 MB of static resources, total
 
SELECT SUM(BodyLength) FROM StaticResource
If you contain any managed package static resource then exclude that in your query and then get the result, because managed package components won't count towards your org limit

Here an idea you can upvote for increasing the 250MB limit
https://success.salesforce.com/ideaView?id=08730000000kuZAAAY
This was selected as the best answer
Giancarlo AmatiGiancarlo Amati
Thank yo. So the Query returns me: 260737022

I believe that between conversion in Bit vs Bytes vs Megabites, the number is telling me that we've hit 250MB Static storage. Am I right to assume that?
GC
Tommaso BolisTommaso Bolis
As I said you need to keep into consideration if you have installed any managed package using static resources.
Managed package components won't count towards your org limit.
BTW you are for sure close to the limit.
Deepali KulshresthaDeepali Kulshrestha
Hi Giancarlo,

Run this query in the developer console and it will return the size in bytes then convert the bytes into MB to get the actual size. Then subtract the converted size with 250 you get the remaining size. An organization can have up to 250 MB of static resources, total

SELECT SUM(BodyLength) FROM StaticResource

I suggest to visit this link, it will help you

https://developer.salesforce.com/forums/?id=906F0000000AxuRIAS

https://developer.salesforce.com/forums/?id=906F00000008lp4IAA

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com