I have a loop appending futures of create document and then waiting until they all complete. The first one always completes. For the 2nd through 4th, I may get one or two, but never all three. I get a generic server error 500. Here is my code
Future<List<dynamic>> SaveFacility() async {
Map<String, dynamic> ourData = {
'facility_name': facilityName,
'facility_building': facilityBuilding,
'facility_room': facilityRoom,
'grid_height': gridHeight,
'grid_width': gridWidth,
};
List<Future> theFutureList = [];
theFutureList.add(
_manageSession.createDocument(ourData, "63eefc630814627ea850"));
for (int theIndex = 0; theIndex < rackList.length; theIndex++) {
Map<String, dynamic> theRackMap = {
'relative_position': rackList[theIndex].relativePosition,
'absolute_position': rackList[theIndex].absolutePosition,
'facility_name': facilityName,
};
theFutureList.add(
_manageSession.createDocument(theRackMap, "63ef152596e8de3a0033"));
}
return Future.wait(theFutureList);
}
I think I got this working. I enclosed the futurelist.add inside a future delayed command. If this is indeed the case, it implies there is some limit to how quickly one can send commands to the server. If that is the case, the error should be more informative.
When you get a 500 error, you'll have to check the docker logs for the appwrite container to see the underlying error
You mean the docker.log on the host or are there specific docker logs for each container, also on the host or contained within the container itself?
There are logs for each container. I was referring to the logs for the appwrite container
Which container would be the one returning this error? There are more than a dozen.
appwrite
[SOLVED] What might be causing a generic server error?
Recommended threads
- Storage System
Hey guys, quick question regarding massive storage scaling. I’m working in digital forensics and I’m constantly dealing with huge binary disk images, usually be...
- _APP_OPTIONS_ROUTER_PROTECTION
Hi Everyone, I just setup a fresh 1.9.0 on a server. Configured everything and now when i try to connect to appwrite for first time setup i get a _APP_OPTIONS_R...
- Selfhost - Starting Docker containers fa...
I am stuck at installing appwrite. Specifically, the containers dont want to start up. The images are downloaded and ready. Dockhand is reporting containers st...