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
- Does 1.9.0 Self Hosted have MongoDB Atla...
I have been playing with the new 1.9.0 update and I am really excited for the MongoDB support. I wanted to ask though if at the current time Appwrite supports b...
- significant increase in CPU usage with 1...
Hi, This is no big deal at all (as everything is working great so far), but I just saw that the update (from 1.8 to 1.9) consumes much more CPU than before (re...
- Issues with executor in Appwrite 1.9.0
Hi, I’ve recently did a fresh install of appwrite 1.9.0 self hosted and when I run a function, it just waits indefinite This is the error from the log: [Er...