size limit for metadata?
See original GitHub issueHi!
I have a Client and a Server in two Winform apps. I send a data request command from the Client to the Server:
metadata.Add("Command", "GetDateData");
Client.Connect();
SyncResponse serverResponse = Client.SendAndWait(ClientTimeout, "", metadata);
Then, at the Server side, I check the command metadata, and send back a Json serialized List of class objects (DfileProperties), from the methode “private SyncResponse SyncRequestReceivedServer(SyncRequest req) { … }”:
replyMetadata.Add("Command", "GetDateData");
string json = JsonConvert.SerializeObject(DfileProperties.GetRange(0, 4), Formatting.None);
replyMetadata.Add("ServerDayData", json);
return new SyncResponse(req, replyMetadata, "");
The interesting thing is that, if the object list DfileProperties contains like 5000 elements, the data never arrives, I get timeout error at the SendAndWait() method. If I limit the List size to like 3 items, the data comes through. Is there a size limit? The Class is not huge, only contains some basic type props, like 25 int, string and DateTime values.
Any idea what can be the problem? Thanks! 😃
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
What is the maximum size of JPEG metadata?
Exif metadata are restricted in size to 64 kB in JPEG images because according to the specification this information must be contained within...
Read more >What is the maximum size of user_metadata and ...
Both the user_metadata and app_metadata are constrained to be 16MB in size. Note that you should only store essential data items in these ......
Read more >What is the size limit of transaction's metadata?
At the moment maxTxSize = 16384 bytes (including metadata). If we talk about the max number of characters in a 16 KB text...
Read more >adding large metadata
Hi David, The maximum size of meta information depends on the file format. With any TIFF-based format, the limit is around 4GB. For...
Read more >Custom Metadata Allocations and Usage Calculations
Usage is calculated in characters. You can store up to 10 million characters. Standard fields like Label, Name, and Namespace, are included in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @bukkideme sorry for taking a long time to get back to you on this. The reason this is happening is as follows:
\r\n\r\n
There isn’t a way AFAIK of peeking ahead in a network stream to find the first occurrence of
\r\n\r\n
, which is why it’s reading one byte at a time and evaluating the buffer each time.So with a lot of metadata, let’s say 1MB, that’s 1024 * 1024 (roughly) evaluations of the end of the buffer to see if the end of the headers has been reached.
I did a simple test using the
Test.Metadata
project (which I’ll be committing momentarily). With 5 key/value pairs in the metadata, is was fast. 50, still ok, 500 it started becoming a problem (148ms), and 5000 was really slow (16.3 seconds).I’ll add some guidance in the README to make sure this is cleared up for others. Hope this helps!
Glad you got it working @bukkideme - I will spend some time testing large-ish metadata to see if I can find a way to reproduce. Cheers!